Monitoring device for management of insulin delivery

ABSTRACT

Monitoring system and method for use with diabetic treatment management. The system comprises: a communication interface configured to permit access to stored raw log data, obtained over a certain time, being indicative of glucose measurements, meals consumed and insulin delivery; and a control unit comprising an unsupervised learning controller configured to receive and process said raw log data and determine at least one global insulin pump setting of basal rate, correction factor, carbohydrate ratio and insulin activity curve parameters. The system may comprise a processing unit comprising a first processor for processing measured data indicative of blood glucose level and generating first processed data, a second processor comprising at least one fuzzy logic module which receives input parameters corresponding to the measured data, the first processed data and a reference data, and processes the data to produce a qualitative output parameter to determine whether any treatment parameter should be modified.

FIELD OF THE INVENTION

This invention is generally in the field of medical application andrelates to a method and system for insulin delivery management.

REFERENCES

The following references are considered to be pertinent for the purposeof understanding the background of the present invention:

-   1. Steil G, Panteleon A, Rebrin K. Closed-loop insulin delivery—the    path to physiological glucose control. Adv Drug Deliv Rev 2004;    56:125-144-   2. Parker R, Doyle Fr, Peppas N. A model-based algorithm for blood    glucose control in type I diabetic patients. IEEE Trans Biomed Eng    1999; 46:148-157-   3. Hovorka R, Chassin L, Wilinska M, Canonico V, Akwi J, Federici M,    Massi-Benedetti M, Hutzli I, Zaugg C, Kaufmann H, Both M, Vering T,    Schaller H, Schaupp L, Bodenlenz M, Pieber T. Closing the loop: the    adicol experience. Diabetes Technol Ther 2004; 6:307-318-   4. Hovorka R, Canonico V, Chassin L, Haueter U, Massi-Benedetti M,    Orsini Federici M, Pieber T, Schaller H, Schaupp L, Vering T,    Wilinska M. Nonlinear model predictive control of glucose    concentration in subjects with type 1 diabetes. Physiol Meas 2004;    25:905-920-   5. Magni L, Raimondo D, Bossi L, Dalla Man C, De Nicolao G,    Kovatchev B, Cobelli C. Model Predictive Control of Type 1 Diabetes:    An In Silico Trai. J Diabetes Sei Technol 2007; 1:804-812-   6. Pedrycz W, Gomide F. Fuzzy Systems Engineering Towards    Human-Centeric Computing. Hoboken, N.J., John Wiley & Sons, Inc.,    2007-   7. Sincanandam S N, Sumathi S, Deepa S N. Introduction to Fuzzy    Logic using MATLAB. Verlag Berlin Heidelberg, Springer, 2007-   8. Sparacino G, Zanderigo F, Corazza S, Maran A, Facchinetti A,    Cobelli C. Glucose concentration can be predicted ahead in time from    continuous glucose monitoring sensor time-series. IEEE Trans Biomed    Eng 2007; 54:931-937-   9. Magni L, Raimondo D, Dalla Man C, Breton M, Patek S, De Nicolao    U, Cobelli C, Kovatchev B. Evaluating the Efficacy of Closed-Loop    Glucose Regulation via Control-Variability Grid Analysis. J Diabetes    Sci Technol 2008; 2:630-635-   10. Standards of medical care in diabetes—2009. Diabetes Care 2009;    32 Suppl 1:S13-61

BACKGROUND OF THE INVENTION

Type 1 diabetes is a chronic, life-threatening disease that is caused byfailure of the pancreas to deliver the hormone insulin, which isotherwise made and secreted by the beta cells of the pancreatic isletsof Langerhans. With the resulting absence of endogenous insulin, peoplewith type 1 diabetes cannot regulate their blood glucose to euglycemicrange without exogenous insulin administration. Therefore, it isnecessary for people with type 1 diabetes to monitor their blood glucoseand administer exogenous insulin several times a day in a relentlesseffort to maintain their blood glucose near euglycemic range.

The existing blood glucose management devices assist a diabetic patientin managing their blood glucose levels during everyday routine. Some ofthese devices are insulin pumps that provide continuous delivery ofinsulin throughout the day. Others are, for example: glucose monitoringdevices which measure blood glucose levels along a certain time linei.e. to obtain blood glucose reading; and Artificial Pancreas (AP)systems which automatically modulate insulin delivery (optionally otherhormones) according to measured glucose levels.

Insulin pump allows the physician to preset the pump settings to manydifferent basal rates to allow for variation in the patient's lifestyle.In addition, the physician can predetermine the insulin bolus delivery(large dose of insulin) to cover the excess demands of carbohydrateingestion or to correct high blood glucose levels. These pump settingsinclude: bloods glucose target levels, insulin basal rate; carbohydrateratio (CR) or factor; correction factor (CF) and constant insulinactivity function.

Normally, the physician receives from the patient personalizedinformation which includes the glucose past trace (measured byglucometer in discrete points or using continuous glucose sensor), theinsulin that was previously delivered (the detailed log of how manyinsulin was delivered—in either basal or bolus—over time), and thedetailed log of the amount and time of all meals and physical activityof the diabetic patients. The physician thus needs to conduct aretrospective analysis (i.e., look at the log data during the clinicalvisit) and determine the insulin pump settings based on thisinformation.

Various techniques have been developed aimed at facilitating theoperation of the insulin delivery pump device. Such techniques aredisclosed for example in the following patent publications:

US Publication No. 2008/0228056 discloses an apparatus comprising a userinterface configured to generate an electrical signal to start a basalinsulin rate test when prompted by a user, an input configured toreceive sampled blood glucose data of a patient that is obtained duringa specified time duration, including a time duration during delivery ofinsulin according to a specified basal insulin rate pattern, and acontroller communicatively coupled to the input and the user interface.The controller includes an insulin calculation module.

U.S. Pat. No. 7,751,907 discloses an apparatus comprising a controller;the controller includes an input/output (I/O) module and a rule module;the I/O module is configured to present a question for a patient whencommunicatively coupled to a user interface and receive patientinformation in response to the question via the user interface; the rulemodule is configured to apply a rule to the patient information andgenerate a suggested insulin pump setting from application of the rule.

US Publication No. 2008/0206799 discloses an apparatus comprising a userinterface configured to generate an electrical signal to begin acarbohydrate ratio test when prompted by a user, an input configured toreceive sampled blood glucose data of a patient that is obtained duringspecified time duration, and a controller in electrical communicationwith the input and the user interface. The controller includes acarbohydrate ratio suggestion module.

U.S. Pat. No. 7,734,323 discloses an apparatus comprising a userinterface configured to generate an electrical signal to begindetermination of an effective correction factor when prompted by a user,an input configured to receive sampled blood glucose data of a patientthat is obtained during a specified time duration, and a controller inelectrical communication with the input and the user interface. Thecontroller includes a correction factor suggestion module.

On the other side, the artificial pancreas systems are usually basedeither on traditional linear control theory or rely on mathematicalmodels of glucose-insulin dynamics. The most common techniques are basedon proportional-integral-derivative control (PID) [1] and modelpredictive control (MPC) [2-5]. However, the nonlinearity, complexityand uncertainty of the biological system along with the inherited delayand deviation of the measuring devices, makes difficult to define amodel and correctly evaluate the physiological behavior of theindividual patient [1-3, 5]. In addition, because most of the controlalgorithms are not amenable to multiple inputs and multiple outputs, themeasured blood glucose level is generally, the only input implemented,and insulin delivery is the only implemented output.

The PID control algorithm produces an insulin profile similar to thesecretion profile done by the beta cells extrapolated by threecomponents [1]. Some controllers include a subset of components, forexample, a proportional—derivative (PD) controller includes theproportional and derivative components to improve robustness. Both PIDand PD use the measured blood glucose (BG) level as the only input andignore other parameters, such as previous administered insulin doses.The MPC is based on mathematical model and equations which describes theglucose level response to different insulin doses and carbohydrateconsumption. As the response to different insulin treatment is impliedby the set of equations, an optimal treatment may be found and appliedaccordingly. The mathematical model is subject specific, and dependsupon system identification phase to estimate the required parameters[3]. The main drawback of MPC in relation to glucose control is the needof a good crisp mathematical model and a good method to estimate itsparameters in order to describe the physiological behavior of thepatient. However, due to the complexity of biological systems, thesemodels are subject to extreme uncertainties, which make it very hard toevaluate and define the model properly. Most of the attempts in the pastto develop Subcutaneous (S.C.) closed loop system used linear controlmethodology to control the non-linear biological system [2, 5] anddisregarded the uncertainty of the biological system and the measuringdevices. In addition, it is quite difficult to implement multiple inputsand multiple outputs using these methods.

General Description

There is a need in the art for a novel approach in management of theinsulin delivery to patients. Such need is associated with thefollowing.

Conventional insulin pumps initially require a physician to arrive tothe required global pump settings and/or “request” a response from thepatient to perform a test for the appropriateness of insulin pumpsettings (previously set by a physician). This, however, requires higherdegree of expertise from the physician and also is based on anassumption that the patient responds correctly to the requests. Suchglobal pump settings remain constant during operation of the insulinpump until such time that the physician or treated patient manuallyresets them. Insulin pump settings generated based on such conventionalapproach would thus unavoidably be too sensitive to the cooperation withthe patient.

The present invention solves the above problems by providing accordingto one broad aspect a novel technique for accurate and reliable tailormade insulin pump settings derived from raw log data accumulating forexample in conventional blood glucose monitoring device(s). The presentinvention, therefore provides unsupervised determination of globalinsulin pump settings, e.g. even without human interpretation orassumptions as to the nature in which data was obtained. The techniqueof the present invention of such unsupervised determination of insulinpump settings from received data is actually absolutely independent fromthe need of cooperative participation on the part of the diabeticpatient.

In contrast to standardized procedure for testing, which require activeparticipation or cooperation of the part of the diabetic patient and/ora physician for arriving to accurate and accountable pump settings, themonitoring technique of the present invention conducts a retrospectiveanalysis of the log/raw data, isolates informative data from rawresidual data, and applies unsupervised learning procedures to arrive tothe optimal global insulin pump settings. The technique of the presentinvention thus provides the capability to extract informative data fromthe raw data, which according to the known techniques is ignored or isexclusively subject to human expert analysis. It should be understoodthat retrospective analysis utilized in the invention is aimed atcalculating global insulin pump settings extracted from historicalmeasured data collected during a certain time interval of several days(at least two days) which forms the raw log data input to theunsupervised data processor. The minimal time interval for the purposesof the invention, i.e. for retrospective analysis, is actually definedby the collection of various types of information (as will be describedfurther below) and the ability of the system (data processor) ofidentifying different information pieces. The inventors have found that,practically, a two-day data record is sufficient for the calculation ofthe pump settings. By settings the lower bound of 2 days for the timewindow for the unsupervised retrospective analysis, the presentinvention utilizes accumulation of substantial raw log data of thetreated patient, however, accumulation of more information is preferredto permit analysis of plethora of data sections of patient information.The historical measured data comprises a plurality of data pieces whichaccording to the invention is appropriately identified, sectioned,isolated and retrospectively analyzed to calculate global insulin pumpsettings from the historical performance in these data sections. Itshould also be understood that the invention provides for dealing withthe raw data while enabling calculate global insulin pump settings,namely pump settings which are optimal and which should be maintained.

According to some embodiments of the present invention, the abovemonitoring system further includes a processing unit having additionalcomponents/modules (software and/or hardware) for additional processingof other relevant data. The processing unit receives the output of theunsupervised controller, and input parameters corresponding to themeasured data, the first processed data and a reference data includingsaid individualized patient's profile related data, individualizedpatient's treatment history related data. The processing unit isconfigured and operable for generating a treatment recommendationaccordingly. The treatment recommendation may be either sentautomatically to the insulin pump or may be presented to an authorizedperson (e.g. a physician or the patient) through a user interface forchoosing whether to apply the treatment recommendation or not.

According to a broad aspect of the present invention, there is provideda monitoring system for use with diabetic treatment management, themonitoring system comprising:

-   -   a communication interface configured and operable to permit        access to stored raw log data obtained over a certain time and        being time spaced data points of glucose measurements, meals        consumed and insulin delivery;    -   a control unit comprising an unsupervised learning controller        configured and operable to receive and process said raw log        data, to determine an informative data piece from residual log        data portion of said raw log data and select said informative        data piece for retrospective analysis to calculate        individualized patient's profile related data comprising at        least one of global insulin pump settings of basal rate (or        basal plan), correction factor (CF), carbohydrate ratio (CR) and        insulin activity curve (AIF).

In some embodiments, the raw log data is acquired in accordance with apreprogrammed sampling pattern. The unsupervised learning controller isconfigured and operable determine each of said parameters from a part ofsaid informative data piece corresponding to a selected time slot ofsaid certain time. Therefore, said informative data piece relatinginsulin pump settings are identified in the corresponding time slots.

The unsupervised learning controller is configured and operable foranalyzing said informative data piece and selects the appropriate timeslot for calculation of each of said parameters; the global insulin pumpparameters being of basal rate (or basal plan), correction factor (CF),carbohydrate ratio (CR) and insulin activity curve parameters.

In some embodiments, the received raw log data corresponds to a memoryimage at the access time irrespective of any user interaction.

In another aspect, the present invention relates to a monitoring systemfor use with diabetic treatment management, the monitoring systemcomprising:

-   -   a communication interface configured and operable to permit        access to stored data being time spaced data points of glucose        measurements, meals consumed and insulin delivery;    -   a control unit comprising a data processor utility for providing        retrospective analysis of said data and determining at least one        global insulin pump setting of basal rate (or basal plan),        correction factor (CF), carbohydrate ratio (CR) and insulin        activity curve parameters, wherein said processor utility is        operable to determine each of said parameters by processing a        data piece of said received data corresponding to a selected        time slot of said certain period of time.

In some embodiments, the processor utility is configured and operablefor analyzing the received data and selects the time slot in saidcertain period of time for determination of each of said parameters.

In some embodiments, the control unit comprises a controller associatedwith said communication interface and preprogrammed for receiving saiddata according to a predetermined sampling time pattern.

The received stored data can be that of a memory image at the accesstime irrespective of any user interaction.

The system can comprise a memory module configured and operable tomaintain the stored data.

The analyzing can include sectioning the stored data; thereby to obtainstored data within a predetermined time window. Where the predeterminedtime window is a Basal data Section (BaS) the calculated insulin pumpsettings being selected is basal rate or basal plan. Where saidpredetermined time window is a Meals data. Section (MS) the calculatedinsulin pump settings being selected from being Active Insulin Function(AIF), correction factor (CF) or carbohydrate ratio (CR). In case, thepredetermined time window is a Bolus data Section (BS) the calculatedinsulin pump settings being selected from correction factor (CF) orActive Insulin Function (AIF). The stored data can be obtained from aremote controller such as for example from a controller or module of aninsulin pump delivery device. In some embodiments, the stored data isaccessible via random asynchronous operation which is independent of auser operation. In some embodiments, the stored data is a memory imageof a remote controller independently accumulating the raw log datainput. The remote controller(s) can independently accumulate saidinformation which records the everyday routine of the treated patient.The information indicative glucose sensor readings, insulin delivery andmeals recordation can be a file being obtained from the remotecontroller independently accumulating said information.

The file can be downloaded from a network and stored in the memorymodule.

In another aspect, the present invention relates to a method for use indetermination of insulin pump settings, the method comprising:performing unsupervised learning of the insulin pump settings, saidunsupervised learning comprising:

-   -   obtaining raw log data input accumulated on one or more glucose        monitoring units recording glucose levels of a single treated        patient along a certain time window;    -   determining informative data piece from raw log data input being        sectioned to data sections, the informative data piece being        determined from said data section; and    -   calculating insulin pump settings from the informative data        piece, wherein said settings include at least one parameter of        basal plan, Carbohydrate Ratio (CR), Correction Factor (CF) or        Active Insulin Function (AIF).

The sectioning procedure of the raw log data provides predetermined datasections which can be any of Basal Section (Bas), Bolus Section (BS), orMeal Section (MS). The method utilizes aligning procedure to provideplurality of data portions of said raw log data input along a sharedtime axis.

The method can further include determining a representative data pointhaving both a value of aggregated blood glucose levels and a time stamp;the value of aggregated blood glucose level is thus paired to a selectedbasal period; the representative data point indicates a basal ratedetermination for the selected basal period.

In some embodiments, the raw log data input of said Basal Section (Bas)includes a series of basal rates as a function of time. The method canthus include:

-   -   determining a time delay characterizing the treated patient at        said Basal Section (Bas), said time delay being between a basal        treatment rate and changes in the glucose level;    -   obtaining a plurality of selected basal rates at a delivery        time, a respective paired glucose level being at the time delay        measured from the delivery time; and    -   determining a resultant basal rate from the plurality of        selected basal rates which minimizes a change in the glucose        level.

In some embodiments the method comprises determining an Active InsulinFunction (AIF) by carrying out the following method:

-   -   obtaining a set of glucose measurements and paired time stamps        for the raw log data in the time section;    -   normalizing each glucose measurement of the set thereby        obtaining a series of normalized glucose measurements and paired        time stamp; and    -   processing said normalized glucose measurements and paired time        stamp into a substantially monotonic non-increasing series;        thereby obtaining the Active Insulin Function (AIF).

In some embodiments, the method includes determining plurality ofglucose level and paired practical carbohydrate ratios for the MSSection; the paired practical carbohydrate ratios being candidatecarbohydrate ratios defining a curve. The final carbohydrate ratio (CR)setting is determined from the candidate practical carbohydrate ratios.

In some embodiments, a correction factor (CF) is determined for the mealand is calculated by processing the AIF to estimate the active insulinin the MS Section and a just-in-time carbohydrate ratio (CR).

The correction factor (CF) can be modified in accordance with thefollowing parameters:

-   -   a proportion between a minimum sensor reading during a time        window or section, a lowest blood glucose reading recorded        outside impending hypoglycaemia and hypoglycaemia time periods;        and    -   a maximum sensor reading in a time slot prior to obtaining the        minimum sensor reading.

In some embodiments, a plurality of candidate correction factors (CF)are determined and the correction factor (CF) setting is determined by avoting procedure performed with those candidate correction factors (CF).

In another aspect, the present invention provides a method fordetermining an Active Insulin Function (AIF) for use in insulintreatment of a patient, the method comprising:

-   -   obtaining raw log data obtained over a certain time and being        indicative of glucose measurements of the patient, the raw log        data being sectioned, containing data obtained at a time        section;    -   obtaining a set of glucose measurements and paired time stamps        for the raw log data in the time section;    -   normalizing each glucose measurement of the set thereby        obtaining a series of normalized glucose measurements and paired        time stamp; and    -   processing said normalized glucose measurements and paired time        stamp into a substantially monotonic non-increasing series;        thereby obtaining the Active Insulin Function (AIF).

In another aspect, the present invention provides, a control unit foruse with diabetic treatment management, the control unit comprising: adata processor utility configured and operable as an unsupervisedlearning controller preprogrammed for processing raw log data inputobtained over a certain time and being indicative of glucosemeasurements, meals events and insulin delivery, the processingcomprising determining an informative data piece from residual log dataportion of said raw log data and selecting said informative data piecefor further processing to determine at least one of basal rate (or basalplan), correction factor (CF), carbohydrate ratio (CR) and insulinactivity curve parameters, and generating global insulin pump settings.

According to some embodiments of the present invention, theabove-described monitoring system further comprises a processing unitcomprising: a first processor module and a second processor module. Thefirst processor module is configured for processing measured dataindicative of blood glucose level and generating first processed dataindicative thereof. The second processor module comprises at least onefuzzy logic module. The fuzzy logic module receives input parameterscorresponding to the measured data, the first processed data and areference data including said individualized patient's profile relateddata, individualized patient's treatment history related data, processesthe received parameters to produce at least one qualitative outputparameter indicative of patient's treatment parameters; such that saidsecond processor module determines whether any of the treatmentparameters is to be modified and generate corresponding output datawhich can be supplied directly to the pump and/or presented through auser interface to an authorized person (patient and/or physician) for adecision making and/or recording.

In a variant, input parameters include at least one of the followinginput parameters: past blood glucose level trend, current blood glucoselevel, future blood glucose level trend, future blood glucose level.

The at least one fuzzy logic module may be characterized by at least oneof the following: (i) it comprises a set of rules associated withcontribution factors and at least one fuzzy engine utilizing one or moremember functions modeled for translating the input parameters into atleast one qualitative output parameter; and (ii) is configured andoperable to provide the at least one output parameter comprising dataindicative of at least one of bolus glucagon, bolus insulin and basalinsulin treatment, said second processor module thereby providingcontrol to range output treatment suggestion based on the outputparameter of the fuzzy logic module.

In another variant, said processing unit comprises a third processormodule receiving said at least one qualitative output parameter of thefuzzy logic module and said input parameters corresponding to themeasured data, the first processed data and the reference data, andprocessing said at least one output parameter said input parameters todetermine whether any of the treatment parameters is to be modified andgenerate corresponding output data which can be supplied directly to thepump and/or presented through the user interface to an authorized person(patient and/or physician) for a decision making and/or recording, saidtreatment parameters comprising at least one of dosing of insulin andglucagon to be delivered.

In a further variant, the at least one output parameter of the at leastone fuzzy logic module comprises data indicative of at least one ofbolus glucagon, bolus insulin and basal insulin treatment, and saidsecond processor module thereby provides control to range outputtreatment suggestion based on the output parameter of the fuzzy logicmodule, the third processor receiving the control to range outputtreatment suggestion, and determining said amount in accordance with atleast one of a glucose target of the patient's profile, patient'sinsulin or glucagon pharmacodynamics, and said measured data.

In a further variant, the processing unit is operable to update and/orcalibrate said individualized patient's profile related data duringtreatment or during monitoring procedure.

Optionally, said individualized patient's profile related data comprisesparameters selected from at least one of global pump settings, insulinsensitivity, glucagon sensitivity, basal plan, insulin/glucagonpharmacokinetics associated data, glucose target level or target rangelevel, and insulin/glucagon activity model.

Said individualized patient's treatment history related data maycomprise patient's insulin delivery regimen given to the patient atdifferent hours of the day.

According to some embodiments of the present invention, said secondprocessor module comprises a fuzzy logic module operable in response toan event being invoked by a detector module analyzing at least onepattern of glucose levels indicative of at least one event, said eventcomprising at least one of sleep, meal, exercise and disease event orrest.

Said system may be configured and operable to alternate between at leasttwo fuzzy logic modules, each handling a different event.

In a variant, said second processor module is operable as a mealtreatment module and is configured to monitor the blood glucose level.

In another variant, the input parameters further include at least one ofthe following input parameters: time elapsed between detected specialevents, blood glucose level with respect to said special event.

Optionally, said measured data is obtained at a certain time, saidmeasured data comprising at least one of current and past glucose levelsrelative to said certain time.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to understand the invention and to see how it may be carriedout in practice, embodiments will now be described, by way ofnon-limiting example only, with reference to the accompanying drawings,in which:

FIG. 1 is an illustration of raw log data used in the present invention,and exemplifies the principles of sectioning of this data into differentdata sections or data section types. The top graph G₁ presents theglucose level L₁ where meal events S₄ are marked by triangles. Thebottom graph G₂ presents the insulin treatment, where the horizontalline L₂ is the basal rate and the vertical lines with circles are theboluses. The section S₁ corresponds to Basal data Section (BaS), sectionS₂ corresponds to Meal data Section MS and section S₃ corresponds toBolus data Sections BS.

FIG. 2 is an exemplified glucose analysis for the glucose levelprocedure to determine the setting of the basal plan. The figureindicates division and aggregation of the raw log data prior to theanalysis.

FIG. 3 is an exemplified glucose analysis for the glucose levelprocedure to determine the setting of the basal plan. The time line ofthe raw log glucose readings data after division and aggregation ispresented with light lines. In this example, the basal periods are setto 00:00, 03:00, 07:00, 11:00, 15:00 and 20:00. The figure also providesthe median glucose level (bold line) for each basal period and thetarget range (shaded area) which is set to 90-140 mg/dl.

FIG. 4 is an exemplary meal section derived from Meal Sections (MSs:MS₁-MS₇) for calculating the recommended carbohydrate ratio (CR). Thetop graph G₃ presents the glucose level (blue line, L₃) where mealevents are marked using a black triangle. The bottom graph G₄ presentsthe insulin treatment, where the horizontal line L₄ is the basal rateand the vertical lines with the black circle are the boluses. Thesections are marked in numbers and with black frame.

FIG. 5 is an illustration in which section MS₁ of FIG. 4 is focused on.The top graph G₃ presents the glucose level (blue line L₃) where mealevents are marked using a black triangle, MS₁. The bottom graph G₄presents the insulin treatment, where the horizontal line L₄ is thebasal rate and the vertical lines with the black circle are the boluses.

FIG. 6 is an illustration in which section MS₄ of FIG. 4 is focused on.The top graph G₃ presents the glucose level (blue line L₃) where mealevents are marked using a black triangle. The bottom graph G₄ presentsthe insulin treatment, where the horizontal line L₄ is the basal rateand the vertical lines with the black circle are the boluses.

FIG. 7 is an illustrative plot diagram of the pairs Ser={DiffBG(i),pracCR(i)} (red dots). The blue line L₅ is the result of the polynomialanalysis while the green line L₆ is the result of the voting analysisand the dash line marks the line of DiffBG=0.

FIG. 8 provides an illustration MS section analysis resulting withcalculating CF settings. The MS time stretch was determined inaccordance with a MS sectioning procedure. The top graph G₅ presents theglucose level (blue line L₇) where meal events are marked using a blacktriangle. The bottom graph G₆ presents the insulin treatment, where thehorizontal line L₅ is the basal rate and the vertical lines with theblack circle are the boluses.

FIG. 9 is a schematic block diagram illustrating in a non-limitingmanner the component a device (or system) for monitoring a diabetictreatment of a diabetic patient.

FIG. 10 is a flow chart illustrating a method for unsuperviseddetermining insulin pump settings.

FIG. 11 is a flow chart illustrating a method for unsuperviseddetermination of the basal plan.

FIG. 12 is a flow chart illustrating a method for unsuperviseddetermination of the carbohydrate ratio (CR).

FIG. 13 is a flow chart illustrating a method for unsuperviseddetermination of the carbohydrate ratio (CF) settings.

FIG. 14 shows a flow chart of a procedure for unsupervised determinationof the active insulin function, according to an embodiment of theinvention.

FIG. 15 is a schematic diagram of an embodiment of the present inventionutilizing a monitoring system configured for generating a treatmentrecommendation, and communicating the treatment recommendation either tothe pump or to an authorized user (such as a patient);

FIG. 16 is a flow diagram of a method of the present invention formonitoring diabetes treatment of a patient and generating a treatmentrecommendation;

FIG. 17 is a graph illustrating the percentage of insulin active in theblood after a bolus injection;

FIG. 18 exemplifies the parameters of the fuzzy logic module;

FIG. 19 is a schematic diagram of a treatment system utilizing amonitoring system of the present invention, including an event detector;

FIG. 20 is an example of the operation of the monitoring systemutilizing a of the present invention;

FIGS. 21A-21D are 24 hours closed loop session results conducted on asubject. FIG. 21A shows the CGS readings (black line) and the referencemeasurements (black diamond). FIG. 21B shows the insulin treatmentdelivered by the monitoring system of the present invention. FIGS. 21Cand 21D show results from control performances comparison between homecare (circles) and by using the monitoring system of the presentinvention (rectangular) using the Control Variability Grid Analysis [9]during time period of 24 hours (FIG. 21C) and during night time (FIG.21D).

DETAILED DESCRIPTION OF EMBODIMENTS

In accordance with the present invention, insulin pump settings arecalculated on the basis of raw log data utilizing an unsupervisedlearning procedure carried out by a controller utility constructed andoperable according to the invention. The controller analyses machinereadable raw log data without supervision or human assisted analysis aswell as without a need for any other pre-processing of said data. Theinvented technique permits an assignment of set of parameters whichdefines the patient's insulin pump treatment management and does notrequire human pre-processing or assistance.

All that is necessary for learning the raw log data is the provision ofthe raw log data input to the system or device of the present inventionin a machine readable format.

The insulin pump settings include a set of parameters which defines thepatient's insulin pump treatment management. Conventionally, theseparameters are determined at least initially by a trained physician byretroactively manually analyzing past performance of patient's inputdata in the form of graphs and decision making by the physician basedsolely on his intuition and experience, being thus substantiallysubjective decision. Moreover, according to the conventional approach,such set of parameters (insulin pump settings) is tailored specificallyfor each patient by the physician in accordance with the retrospectiveanalysis.

The insulin pump settings typically include the following:

-   -   Basal Plan, which is the constant infusion of insulin as planned        for the hours/time of the day. It consists of several “basal        rates” (typically in units of insulin per hour) and delivered at        different times of the day. An exemplary, non limiting        illustration can be understood from Table 1.

TABLE 1 The Basal Plan Hour of the day Basal Rate [u/h] 00:00 0.8 07:001.5 20:00 1  

As shown in Table 1, the first column represents the delivery time orthe time slot in which insulin is delivered. The second column shows theamount of insulin to be delivered. As the person skilled in the artwould understand, plurality of data structures and memory utilities canmaintain the basal plan related information. Essentially, the memoryitems maintaining such information comprise a pair of the followingstructures in the form of <time stamp, basal rate> or <a period oftime/time slot, basal rate>. These pairs of data pieces is also shownand discussed herein.

In this connection, reference is made to FIG. 1 showing a non-limitingexample of blood glucose level measured data (graph G₁), and the insulintreatment (graph G₂) in which the horizontal line L₂ corresponds to thebasal rate and the vertical lines with the black circle correspond tothe boluses. These graphs will be described more specifically furtherbelow. With regard to the basal plan, the horizontal line L₂ in graph G₂represents the above-discussed pairs <a period of time/time slot, basalrate>. The graph G₂ is illustrating the treatment as changing as afunction of time. In FIG. 1, within the time slot from 00:00 to 02:00,1.1 units/hour are planned to be delivered. The corresponding pair canbe, for example, <00:00-02:00, 1.1>. The person skilled in the art wouldappreciate that there are variety of ways to encode such information andthe particular encoding regime can be determined for such purpose.

-   -   Carbohydrate Ratio (CR) is a parameter of the insulin pump        settings which is used to determine the required insulin bolus        to compensate for carbohydrates (CHO) consumed in meals by the        patient. CR is typically defined in gram of CHO per units of        insulin. For example, the patient would eat a meal with CHO        content of 50 grams and his CR is equal to 5 gr/units. In this        scenario, the patient would require to receive an insulin bolus        of 10 units (also termed as “meal insulin bolus” to emphasize        that the bolus is required as a result of the meal).    -   Correction Factor (CF) is a parameter of the insulin pump        settings used to determine or decide the needed insulin bolus to        compensate for changes of the blood glucose level from a target        blood glucose level. CF is defined in mg/dl per units of        insulin. For example, the patient's blood glucose level is 250        mg/dl and the target blood glucose level is 100 mg/dl, in which        case the CF is determined by the physician to be 50 mg/dl/units.        In this scenario, the patient will require to deliver a        correction insulin bolus of 3 units, i.e. in order to correct        150 mg/dl above the target threshold. Another example is when        the blood glucose level is below a predefined target or        threshold. For example, if the blood glucose level is 65 mg/dl,        the patient will calculate a correction bolus of (−0.7) units,        i.e. in order to correct 35 mg/dl below the target threshold.        The patient can use this result and subtract it from the meal        insulin bolus if he wishes to eat. In some scenarios, the meal        bolus was originally 10 units, the patient can consider his low        blood glucose level and deliver only 9.3 units (10-0.7 units).    -   The Insulin Activity Function (AIF) is another parameter of the        insulin pump settings defining the percentage of insulin that is        still active (i.e., Active Insulin, also termed as “AI”) at (T)        hours after delivery, e.g. typically as a function of time. The        expression “still active” means that these units of insulin have        an influence on the blood glucose level and insulin still        actively participates in glucose regulation from the blood to        the cells. The AIF defines the pharmacodynamics behavior of        insulin for the patient. According to the conventional insulin        delivery management technique, AIF is selected from constant        predefined portfolios which were defined on the basis of data        which relate to a class of patients and not to a specific        patient being treated. The physician chooses from these        predefined AIF the specific for use. For example, the following        equation sometimes is describing the AIF:

AI=100−20t  (1)

where AI is the percentage of active insulin, and t is the time (e.g. inhours) that passed since delivery of the insulin. For example, employingthis function, where an insulin bolus in size of 4 units was deliveredat t=0, than at t=1 hour, 80% of this bolus is still active, i.e. 3.6units; and at t=5 hour, this bolus has no longer active.

It should be noted that some delivery pumps permit for subtracting anamount of active insulin from a calculated insulin bolus.

-   -   Blood glucose target level, which is the blood glucose level        that the patient is aiming at, while a correction bolus is being        determined.

Some insulin pumps have a bolus calculator which allows the patient toinsert the CR, CF, AIF and targets to the pump and assists the patientin calculating the required bolus.

In order to optimize and improve the glucose level control of a treatedpatient, it is essential to appropriately tailor the pump settings, i.e.the blood glucose targets, insulin correction factor, carbohydrateratio, basal plan and insulin activity function. These tailored pumpsettings can be further changed from time to time.

In normal practice, the physician receives from the patient (during thevisit or over the web) the patient's input which includes the followingdata:

(a) The glucose trace (e.g. measured by glucometer in discrete points orusing continuous glucose sensor). The case may be such that thephysician obtains this information as a data record (typically in theform of a graph), e.g. from the memory component of a glucose monitoringunit or glucose management device. This information can be in the formatof <time stamp(i), BG(i)>, where BG(i) is the measured blood glucose.

(b) The amount of insulin that has been delivered (e.g. the log of howmany insulin units were delivered—in basal or bolus—over time). Thisinformation can be in the format of time stamp(i), BasalRate(i)> and<time stamp(i), Bolus(i)>, where BasalRate(i) is the delivered basalinsulin and Bolus(i) is the delivered bolus insulin; and

(c) The meal/activity log (the detailed log of the amount and time ofmeals or activity). This information can be in the format of <timestamp(i), M(i)>, where M(i) is the amount of CHO consumed.

The person skilled in the art would appreciate that other data formatscan by employed to represent data item (a), (b) and (c).

The present invention utilizes such data records, being actually raw logdata, obtainable from the memory component of the insulin delivery pumpor other measurement and/or storage apparatus used to record the dataitem (a), (b) and (c) and possibly other information during the everydayroutine of the treated patient i.e. recordation of every day routine.

Raw log data therefore includes an analog or digital representation ofmeasured signal(s) from the analyte sensor directly related to themeasured glucose and data that was recorded by the patient's insulinpump as insulin delivery and meal consumed. For example, the raw datastream is digital data converted from an analog signal representative ofthe glucose concentration at a point in time, or a digital datarepresentative of meal consumption at a point in time. The terms broadlyencompass a plurality of time spaced data points from a substantiallycontinuous analyte sensor (or continuous glucose sensor), each of whichcomprises individual measurements taken at time intervals ranging fromfractions of a second up to, for example, 2, 4, or 10 minutes or longer.The time-spaced data points, in some embodiments, adhere to apreprogrammed sampling pattern.

The raw log data can be obtained or received from stored data (from amemory utility which may be associated with a remote computersystem/database or with the measurement device of the patient). Thestored data can be thus obtained as a memory image at the access time tothe stored data. In this context, a memory image refers to data storedfor example in an insulin delivery pump As-Is without furtherprocessing. Data collected at the patient's every day routine activityis different from that gathered while intentionally guiding thepatient's activity. For the purposes of the invention, the raw log datamay be continuously accumulated without any special attention of themonitored patient (other than being connected to the monitoring unit),as well as without any special attention of a clinical personnel.Recording these measurements over time is performed as a part of amonitoring phase, in any known suitable technique, which by itself doesnot form part of the present invention. The use of such raw log dataused in the present invention does not include standardized procedurefor testing which requires active participation from the patient or testtime lines, i.e. the patient maintains normal every day activity and isnot required, for example, to consume or to refrain from consuming anyfood matter. It is important to note that this raw log data is gatheredover a time interval of several days during every day activity of thepatient. The present invention provides a novel technique fordetermining insulin delivery pump settings from said raw log data beingrecorded during the everyday routine of the patient.

Comparing the above to the conventional approach, it should beunderstood that the invention eliminates a need for a physician toconduct any retrospective analysis (i.e., look at the data during theclinical visit) and subjectively conclude how to change the globalinsulin pump settings based on this information. This is advantageousbecause practically not all physicians have the needed expertise tofulfill this task properly. In addition, for those who have the neededexpertise, this task is very time consuming. Sometimes analyzing thedata becomes very difficult due to the fact the data has no clearpattern visible/identifiable for the human eye in order to arrive to theconclusion regarding the appropriate insulin pump settings.

Therefore, the present invention addresses the challenge of replacingthe trained physician's retrospective analysis of the patient's input byproviding an unsupervised system which is capable of properly analyzingthe raw log data input. Such unsupervised system of the presentinvention organizes the data (i.e. isolates the informative essence fromthe subordinate), learns and determines insulin pump settings in orderto optimize glucose level control. The inventors termed this property as“MD-Logic” system. The input to the system may include solely the storedraw log data obtained over a certain time window and being indicative ofcurrent insulin pump settings, glucose measurements, meals events andinsulin delivery. The raw log data is processed by a control unitcomprising an unsupervised learning controller configured and operableto receive and process the raw log data, determine an informative datapiece from residual log data portion of said raw log data, and selectsaid informative data piece for further processing aimed at determiningat least one of basal rate, correction factor (CF), carbohydrate ratio(CR) and insulin activity curve parameters, and generating an insulinpump settings. The insulin pump settings are global insulin pumpsettings, i.e. constant settings which are not changed during operation.

Unsupervised learning procedure, in accordance with the embodiment ofthe present invention, includes the following processes:

-   -   a) Initial data analysis and sectioning;    -   b) Learning Basal Plan algorithm;    -   c) Learning AIF algorithm;    -   d) Learning CR algorithm;    -   e) Learning CF algorithm;    -   f) Updating the settings of the Settings the Targets.

It should be noted that the present invention is limited neither to theperformance of all of the above listed procedures nor to an order inwhich they are listed above.

In some embodiments, the unsupervised learning controller is configuredand operable to perform at least one of the unsupervised learningprocedures or methods. The unsupervised learning procedures should beunderstood as those which determine insulin pump settings from raw logdata as defined above without human participation during the raw logdata collection and/or during the process performance which arrives tothe determination of the insulin pump settings. As indicated above, rawlog data is log recordation being performed during regular routineactivity of the patient irrespective of any assumed testing or otherpremeditated assumption relating to the specific patient or physician(i.e. a user independent procedure/method).

The following is the more specific description of the examples of theinvention for implementing each of the above procedures:

Initial Data Analysis and Sectioning

Raw log data contains data, for example, from one or more drug deliverydevices (or monitoring device(s) recording the required measurements),and/or glucose measurement device(s) and/or the carbohydrate consumed bythe patient. These data pieces may be collected for several days whilethe patient is maintaining his/her daily routine and insulin treatment.

The inventors have found that insulin pump settings' learning may beachieved by focusing on certain time slots in which the raw log data hasbeen accumulated. In this respect, a time slot is a time window having astarting point and an end point. Raw log data being accumulated in acertain time slot refers to raw log data having a timestamp accrued insaid time window, i.e. between the start and end points. The inventorshave found that different insulin pump settings' parameters should beacquired at different time slots. In some embodiments, therefore,different components/parameters of the insulin pump settings requirepre-processing of the entire raw log data to identify itsmatching/paired time slot. In some embodiments the data sections adhereto a preprogrammed sampling pattern. The inventors have found that thedata sections and their associated or paired pump settings' parameterscan be described as follows:

A) Basal Data Sections (BaS)

Identification of the matching/paired time slot for the basal plandetermnation is based on the understanding that changes in the basalplan are particularly informative where boluses or meals do not affectthe glucose measurements. Therefore, the BaS sections include datapoints that include only sensor log measurement and basal ratesdelivered, and are distant in time from the effect of insulin bolus ormeals. A time window or zone including data indicative of the effect ofmeal and/or bolus injection can be determined automatically. The BaSsections can be defined as those which do not include the effect windowof either meal or bolus. For example, the BaS section can be determinedas three hours time slot following a bolus delivery or a meal.Optionally, the effect zone can be set (automatically or manually) toabout 2, 3.5, 4, 6 or 8 hours following the bolus delivery or the meal,or even more. In some embodiments, BaS time slot starts about threehours after the last recorded bolus or meal and terminates at theoccurrence of the next meal or bolus.

B) Meals Data Sections (MS)

MS sections contain data points such that their time stamps are at mostabout 3 hours ahead of a meal data point. Each of MS sections cancontain raw log data indicative of one or more meals, insulin boluses,basal rate and glucose measured levels.

C) Bolus Data Sections (BS)

These sections contain data points that match the following criteria:

-   -   Starting point of BS section that can be determined as one of        the following:        -   1) The end point of the MS section or BaS section; or        -   2) Insulin bolus data point which is not included in the MS            section and which has its time stamp at most 3 hours ahead            of the previous insulin bolus.    -   The ending point of this section could be one of the following        (in all the below options, the time stamp of each option is        always ahead of the above starting point):        -   (1) The beginning of the MS section or BaS section; or        -   (2) The latest option (in time scale) among the following:            -   (a) 3 hours ahead of insulin bolus data point without                any bolus insulin in that time frame of 3 hours; or            -   (b) 3 hours after the starting point without any bolus                insulin in that time frame of 3 hours.        -   (3) In any case, this section length will be not shorter            than about 1 hour.

Turning back to FIG. 1, it provides examples for the different sectiontypes which were stated above and determined in accordance with theabove sectioning procedures, i.e. Basal data Sections (BaS), Meals dataSections (MS) and Bolus data Sections (BS), The top graph G₁ in FIG. 1presents the glucose level where meal events S₄ are marked using a blacktriangle. The bottom graph G₂ presents the insulin treatment, where thehorizontal line L₂ is the basal rate and the vertical lines with theblack circle is the boluses. The section S₁ corresponds to BaS, namelythis section S₁ is used by the learning procedure to produce ordetermine the basal rate parameters. Section S₂ corresponds to MS, i.e.is used by the learning procedure to produce or determine the CR, AIF orCF parameters, as described below, and section S₃ corresponds to BS,namely is used by the learning procedure to produce or determine the AIFor CF parameters, as described below.

In some embodiments, the present invention relates to a sectioningmodule; the sectioning module is configured and operable to analyze rawlog data being provided as input; the input is processed to produceoutput signal indicative of at least one data section of Basal DataSection (BaS), Meal data Section (MS) and Bolus data section (BS).

By way of non-limiting example, the BaS can be provided as input to abasal plan module to be processed and calculate the appropriate basalplan. The BS can be provided as input to any of the correction factormodule and/or the AIF module. The MS can be provided as input to any ofthe carbohydrate ratio module, correction factor module and/or the AIFmodule.

Learning Insulin Pump Settings

FIG. 10 is flow diagram 200 exemplifying the major procedures performedby the monitoring system of the invention (for example by system 100,discussed below) to learn and determine global insulin pump settings.The insulin pump settings can include at least one of basal plan, CR, CFand AIF. Specific techniques to determine basal plan, CR, CF or AIF isprovided herein below.

The method comprises obtaining raw log data 210, as input data to thecontroller/processor of the invention. The raw log data input is machinereadable data from which analysis is derived.

Learning insulin pump settings includes determining informative datapiece(s) 230 from sectioned raw log data 210. Informative data pieceincludes those data items in the raw log data which comprise a reliableinput for further learning techniques of insulin pump settings. In someembodiment, the informative data piece comprises glucose patterns ortraces which can be relied upon in analysis. It can also include databeing derived or enhanced from the raw log data. The informative datapiece being identified can thereafter be used for further unsupervisedlearning (or determining) of the insulin pump settings 240. The insulinpump settings 240 can be any of carbohydrate ratio, basal plan andcorrection factor.

Therefore, method 200 permits unsupervised determination of insulin pumpsettings on the basis of raw data and without necessitating cooperationon the part of the user or a trained physician.

All that is necessary for the unsupervised learning and pump settingsdetermination is the provision that the raw log data input has a machinereadable format.

In some embodiments, the method 200 includes specific sectioning of theraw log data 220. The inventors found that each of the parameters orsettings of the insulin pump can utilize different data portions of theraw log data input. In some embodiments, the raw log data is processedby sectioned portions which can be used for the determination of basalplan 222. The procedure to isolate or section the raw log data input toBaS section (i.e. basal related information) were described above.

In some embodiments, the method 200 includes sectioning the raw log datainput to MS section 224 i.e. meal events related data. In someembodiments, the method 200 includes sectioning the raw log data inputto BS section 226 i.e. bolus related data.

In addition, the inventors have found that accuracy of the insulin pumpsettings being determined can be enhanced by aligning the raw data andoptionally aggregating the aligned data input. Such alignment procedureenhances and/or isolates informative data pieces from more varied inputdata. Thus, for example, raw log data input being collected “on the fly”can be used instead of for example, standardized test performed atpredetermined conditions by the treated patient.

The sectioning techniques further permit data analysis of plurality ofdata sections, the plurality of data sections is utilized fordetermination of a specific insulin pump parameter, such as the CR, CFor the basal plan. Initial data analysis and sectioning was alreadydescribed above.

The plurality of data sections is analyzed together to enhance thoseinformative (and/or recurrent) data pieces implicit in those raw data ofthose sections. BaS sections are used for the analysis of basal rateparameters, BS sections are used for the analysis of CF or AIFparameters and MS sections are used for the analysis of CR, AIF or CFparameters.

Learning Basal Plan

Insulin that is delivered through the basal plan typically affects thedynamics of the glucose levels, but this effect is subtle compared tothe observed effect of carbohydrates consumption (meals) and giveninsulin (boluses). Therefore, the raw log data of measured glucoselevels can be “cleaned” by using informative segments or portions of theraw log data and selectively not using data segments of glucose levelsthat might be affected by meals or bolus insulin (MS or BS section). Insome embodiments, the learning procedures of the present inventionanalyze the “cleaned” data or the informative segment of the raw logdata. In some embodiments, the “cleaned” data is the raw log data of theBaS section. In other embodiments, where for example, such clean data isnot available, and therefore other data segments are used to analyzeinsulin pump settings for basal insulin (elaborated below).

The basal plan can be represented as a series of individualized basaltreatment rates as a function of time. The analysis of such data isperformed separately for predefined periods of the day (i.e. BasalPeriods). By way of an example, raw log data is separately analyzed forbasal period 0000 h-0400 h separately from the other data.

FIG. 11 is a flow chart 300 describing a method for unsupervisedlearning of the basal plan in accordance with an embodiment of thepresent invention. The unsupervised learning method 300 includesobtaining sectioned basal data from the raw log data of glucosemeasurements, meals events and insulin delivered (step 310). Thesectioning procedures were described above and are applicable in thepresent context as well. In some embodiments, the raw log data includesglucose measurements and insulin delivered, i.e. meal event is notmandatory in the embodiment.

The method 300 also includes determining predefined basal periodsoptionally, as time slots or periods along a day 315. The raw datainputs of those periods being collected in plurality of calendar daysare aligned, as will be further elaborated below, to extract informativedata specific for that/those period(s) of the day. Prior to analysis,the raw log data input can optionally be shifted with a time delay whichcan be calculated as described below.

In some embodiments, the method 300 performs a procedure 320 todetermine the time delay characterizing a treated patient from insulindelivery and blood glucose changes (calculation of the time delay A wasdescribed herein). Following the determination of the time delay,determining basal rates for each predefined basal period in accordancewith an estimated time delay factor between glucose measurements andbasal rates can be performed. For example, in response to a time delayA₀ the raw log data input can be shifted accordingly at about the timedelay A₀ to properly compensate for said delay characterizing thetreated patient.

Following the obtaining of raw log data input, the method includes alearning basal plan procedure 330, Slope related algorithm 332, designedto determine whether the patient is in need for change of the basalplan, can be performed. This procedure is based on the value of dG andthe glucose level at the end of each “clean data” section (e.g. the BaSsection). Alternatively or in combination with the procedure of sloperelated algorithm 332, the glucose level algorithm 334 utilizing raw lowdata can be performed. The raw log data input needs not be cleaned orpreprocessed, i.e. general log data of glucose level and basal rates areused.

In some embodiments, the learning procedure for determining the basalplan can be initiated by determining or calculating the currentcharacterizing time delay of the specific patient beingmonitored/measured from occurrence of changes (or fluctuations) in bloodglucose measurements and the basal rates delivered.

Glucose sensor readings (G(t)) and the basal rates (B(t)) are obtainedfrom BaS Section. A change of glucose levels between two data points isthus determined, i.e., the difference between the glucose levels at theend of the section to the beginning of the section, and can be denotedby dG. A change of glucose levels in time (t) can be defined as follows:DG(t)=dG/dt.

Variable (A) denotes the time delay between the basal rates and themeasured glucose level. Basal rates at B(t) affect DG(t+A) by the delaytime caused by infusing. Parameter A can be derived as follows:A=argmax(A, E{B(t)DG(t+A)}), being the parameter which maximizes theexpectancy of the multiplied series B(t)*DG(t+A).

Following the determination of the time delay (A), a series of [DG(t+A),B(t)] can be defined and used. Therefore, in some embodiments, therelationship between basal rates and a change of glucose level isrepresented by the series [DG(t+A), B(t)], thereby obtaining a series ofbasal treatment rates and corresponding changes in glucose level in atreated patient, a series from which basal rate can be calculated asdisclosed herein

In some embodiments, the basal periods are set or determined as follows.These basal periods can be defined manually or be automatically deductedfrom the data. By way of non-limiting example, predefined basal periodsof the day can be set to: 0000 h-0300 h, 0300 h-0700 h, 0700 h-1100 h,1100 h-1500 h, 1500 h-2000 h and 2000 h-2400 h. The learning procedureswill produce the required basal rate for these basal periods. In someembodiments, the required basal rate is determined for each of thesebasal periods. Once the basal periods are defined or automaticallydeducted, the algorithm will match the BaS data or the raw data to eachof the basal periods and conduct the analysis to calculate the neededbasal rate for the basal periods.

Basal rate for a paired basal period, e.g. <time period, basal rate>,can be calculated as follows:

-   -   minimizing changes in blood glucose algorithm: the series        [DG(t+A), B(t)] in the BaS section can be interpolated by using        the series values to find B(t) corresponding to the condition        that DG(t+A)=0, and selecting the basal treatment rate which        minimizes a change in the glucose level (e.g. B(t)) from the        series of basal treatment rates previously calculated).    -   Performing slope related algorithm: This procedure is designed        to determine whether the patient is in need for change of the        basal treatment rate based on the value of dG and the glucose        level at the end of each “clean data” section (e.g. the BaS        section). Where dG is above a predetermined threshold and        glucose level at the end of the section is higher than a        predetermined value, basal treatment rate needs to be increased        at a corresponding preset insulin treatment. Where dG is below a        predetermined threshold and glucose level at the end of the        section is lower than a predetermined value, basal treatment        rate needs to be decreased at a corresponding preset insulin        treatment. By way of non-limiting example, in case dG>40 mg/dl        and the glucose level at the end of the section is higher than        120 mg/dl, the basal treatment rate needs to be increased.        Another example can be provided as follows. In case dG<−40 mg/dl        and the glucose level at the end of the section is lower than        150 mg/dl, the basal treatment rate needs to be increased. The        amount of the decrease or increase (i.e. corresponding preset        insulin treatment) can be set as a constant amount in        units/hour. Alternatively, it can be set as a percentage from        the previous basal treatment or can be as function of dG and the        previous basal treatment.    -   Performing glucose level algorithm: This procedure utilizes raw        low data which need not be cleaned or preprocessed, i.e. general        log data of glucose level and basal are used. Thus, the present        invention uses raw data to support and/or adjust clean data        sections. This procedure is designed to determine whether there        is a need to change the basal treatment rate based on        accumulation of data during specific basal periods as defined        above. Informative raw data is enhanced by accumulation of data        in shared time slots or periods.

Therefore, the procedure aligns and optionally aggregates raw glucoselevel data of plurality of basal periods, thereby enhancing essentialinformation embedded in the raw data. In some embodiments, the glucoselevel data of two or more days is aligned. Alignment can be in the formof matching a first glucose level data point of a shared basal periodwith paired (or second) glucose level data point of the shared basalperiod, where (r₁, x) is aligned with (r₂, x), r₁ being a glucosereading of day₁ and r₂ being a glucose reading of day₂, and x is theshared basal period. In some embodiments, alignment can be in the formof matching a first glucose level data point of a shared timestamp in afirst day with a paired (or second) glucose level data point of aboutthe same timestamp in a second day. e.g. (r₁, x) is aligned with (r₂,x), r₁ being a glucose reading of day′ and r₂ being a glucose reading ofday₂, and x is the shared timestamp. In some embodiments, the alignmentprocedure exposes unique expressed glucose patterns. The aligned glucosedata is processed to determine, for example, a representative glucoselevel for the shared basal periods or shared timestamps. Therepresentative glucose level can be selected to be the median glucoselevel of the aligned glucose levels in the basal period. Therepresentative glucose level can be selected to be an aggregated valueof the aligned glucose levels in the basal period. In some embodiments,the difference between the median glucose level and target glucose levelis determined.

In an exemplary embodiment, the Glucose level algorithm may be asfollows:

(a) glucose level data of several calendar days is aligned; and the datais aggregated according to the basal period of day. In this connection,reference is made to FIG. 2 which is an example of the glucose analysisfor the glucose level procedure to determine the setting of the basalplan. The figure indicates alignment of divided periods and aggregationof the raw log data prior to further analysis. FIG. 2 exemplifies thealigned glucose level data. The aligned glucose data points in FIG. 2are shown in the form of a graph. The inventors have found that aligningglucose level data isolates and unravels informative elements of theglucose level data which otherwise could be overlooked. Additionally, itpermits unsupervised determination of insulin pump settings by exposingthe informative elements of glucose data to further analysis;

(b) determination of the average glucose level for the basal periods foreach calendar day;

(c) determination of the median of the average glucose level for thebasal periods for calendar days as a representative value for furtheranalysis. Turning back to FIG. 3, it shows an example of the glucoseanalysis where the time line of the raw log data was divided to basalperiods/section of (00:00, 03:00, 07:00, 11:00, 15:00 and 20:00). Thefigure also provides the determined median glucose level for each basalperiod and the target range which is set to 90-140 mg/dl. The medianglucose levels were calculated as described above;

(d) evaluation of the difference between the determined median valuesand the target range for each basal period, as follows:

-   -   (d.1) if the difference is within the target range, the basal        rate for this basal period remains unchanged;    -   (d.2) if the difference is above the target range, the basal        rate for this basal period is increased; and    -   (d.3) if the difference is below the target range, the basal        rate for this basal period is decreased.

The amount of the reduction or increase can be set as a constant amountin units/hour, or can be set as a percentage from the previous basaltreatment, or can be a function of the difference between the median andthe target glucose level and the previous basal treatment. In theexample shown in FIG. 3, the procedure will recommend to increase thebasal rate in the basal period 03:00-07:00 and 20:00-00:00 beforeconsidering the time delay calculated as mentioned above.

The basal plan settings of the insulin pump can be set according to aweighted average of the Glucose level procedure, Slope related algorithmand/or Minimizing changes in blood glucose algorithm. The obtained basaltreatment rate, taken as one or a weighted average (of Glucose levelprocedure, Slope related algorithm and/or Minimizing changes in bloodglucose algorithm), can be used to modify the basal plan of the treatedpatient, e.g. by modifying the basal plan of an insulin pump.

In some embodiments, basal plan settings of the insulin pump can be setaccording to the Glucose level procedure. In some embodiments, basalplan settings of the insulin pump can be set according to the minimizingchanges in the blood glucose algorithm.

In some embodiments, the present invention relates to a basal planmodule; the basal plan module is configured and operable to perform theprocedures for unsupervised learning of the basal plan or rate; thebasal plan module is configured and operable to analyze BaS beingprovided as input; the input is processed to produce output signalindicative of global insulin pump settings of basal plan. In otherembodiments, the basal plan module is configured and operable to analyzeraw log data provided as input; the input is processed to produce outputsignal indicative of global insulin pump settings of basal plan. Inother embodiments, the basal plan module is configured and operable toanalyze Bas and raw log data both being provided as input; the input isprocessed to produce output signal indicative of global insulin pumpsettings of basal plan.

Learning Active Insulin AIF Algorithm

The present invention permits the unsupervised learning of the activeinsulin function (AIF) tailored specifically for the treated patient. Insome embodiments, the present invention thus provides methodologies,devices and systems which can obtain a patient dependent active insulinfunction (AIF) instead of the conventional trial and error proceduresadopted by the physicians.

In general, AIF describes the amount of the insulin “active” in theblood at a certain time. AIF is a measure for the specificpharmacodynamics characteristics for insulin (denoted as activeinsulin). In the present invention, AIF is a measure for the specificpharmacodynamics for the treated patient Active insulin can be definedwith reference to a specific meal, to a series of meals, to a specificinsulin bolus event or a series of insulin bolus events. In someembodiments, therefore AIF is determined from BS and MS Sections.

Reference is made to FIG. 14 which is a flow chart 600 illustrating aprocedure for unsupervised determination of the active insulin function.This procedure 600 includes obtaining a set of glucose measurements andpaired time stamp for a specific sectioned raw which can be denoted as(i) (step 610). These glucose measurements and paired time can beobtained from raw log data. The set of glucose measurements arethereafter normalized thereby obtaining a series of normalized glucosemeasurements and paired time stamp (step 620), The informative datapiece such as the active insulin functions or curves can be thusobtained as follows.

The input glucose measurement data, either normalized or not, is thenprocessed for normalizing each of the glucose measurements and pairedtime stamp into a monotonic non-increasing series (i) of glucosemeasurements and paired time stamps (step 630), or into a substantiallymonotonic non-increasing series (tolerating about +/−10 percentdivergences from the monotonic non-increasing series). The inventorshave found that the substantially monotonic non-increasing (or themonotonic non-increasing) series well defines the active insulincharacteristic of the treated patient 640 (user dependantpharmacodynamics behavior instead of the fixed constant or fixedfunction which is conventionally used).

In some embodiments, a plurality of active insulin functions or curvesis obtained from analysis of plurality of sectioned raw data. This canbe followed by determination of the median series of said plurality ofmonotonic non-increasing series. The median series represent the AIF forthe plurality of sectioned raw data (or plurality of sections of rawdata).

Therefore, in some embodiments, AIF is determined in accordance with theprocedure comprising the following.

AIi is defined as the active insulin for event (i) which is, optionally,meal or insulin bolus event. The time of the event is denoted as (T₀).Any event has a starting time point and an ending time point. Thesepoints define a first time window. In some embodiments, for each event,the starting time point is defined as starting from the specific event(T₀) as being provided from home care data (log data). The event isended where, for example, the next event starting time occurs orfollowing about seven hours from the starting time point (the earlier ofthe two).

As used herein, peak sensor value following the event is identified anddenoted as S_(mmax). Minimum sensor value which occurred following thepeak is denoted as S_(mmin). The respective time tag when the peakswhere obtained is typically recorded, defining a second time windowbetween the time S_(mmax) and S_(mmin).

Sensor data (e.g. raw log sensor data) during the second time window isobtained. The obtained sensor data can be represented by a series of[T_(i), V_(i)], where (T_(i)) are the time tags of sensor readingsmeasured at the beginning of the meal (T₀), and (V_(i)) are sensorvalues measured at their respective (T_(i)).

In some embodiments, the measured sensor data is normalized to valuesranging between 0 and 1. (N_(i)) represents the normalized value of therespective (V_(i)) and can be calculated as follows:

Ni=Vi/(S _(mmax) −S _(mmin)).

Normalized series [Ti, Ni] can thus be obtained.

In some embodiments, the series (either [Ti, Vi] or [Ti, Ni]) aremodified (or “forced”) into a monotonic series such as a monotonicnon-increasing series. Thus, a non-increasing series is obtained byassociating each (N_(i)) to a minimum normalized (N_(j)), j=1 to i.

This can be performed by sequentially inserting the items of the series(either [Ti, Vi] or [Ti, Ni]) into the non-increasing monotonic seriesif the sensor values in those items do not exceed any of the sensorvalues previously inserted e.g. discarding those breaching values. Inthis regard, sequentially implies processing from a starting time pointto an ending time point.

In other words, (N_(i)) can be obtained as follows,

Ni−min({Nj},j=1:i).

By way of a non-limiting example, for the series N_(j)={1, 0.9, 0.8,1.2, 0.7}, N_(i) will be {1, 0.9, 0.8, 0.8, 0.7}.

The meal peak value, i.e. at (T₀), can be added. Thus, [T₀, 1] is addedat the beginning of the series [T_(i), N_(i)].

The series thus obtained represents the active insulin Ali for aspecific meal or a bolus insulin event.

Where more than one meal took place or where more than one bolus eventtook place or where one had several meal and bolus insulin events, theactive insulin series for a set of events can be obtained. The activeinsulin for a set of events is the median of all the meal series {Ali}.The resultant series, denoted as AI_total, represents an active insulincurve applicable to all events. The values in AI_total represent thepercentage of insulin which is still active in the treated patient. Forexample, elements of [t=25, v=0.8], within the AI_total series, canindicate that 25 minutes after injecting a bolus, 80% percent of insulinwas still active.

In some embodiments, the present invention relates to an AIF module; theAIF module is configured and operable to perform the procedures forunsupervised learning of the active insulin curve or function; the AIFmodule is configured and operable to analyze MS being provided as input;the input is processed to produce output signal indicative of globalinsulin pump settings of insulin activity curve parameter. In someembodiments, the AIF module is configured and operable to analyze BSbeing provided as input; the input is processed to produce output signalindicative of global insulin pump settings of insulin activity curveparameter. In some embodiments, the AIF module is configured andoperable to analyze BS and MS both being provided as input; the input isprocessed to produce output signal indicative of global insulin pumpsettings of insulin activity curve parameter.

Learning CR Algorithm

The carbohydrate ratio (CR) is measured in units of [gram/Units]. Thecarbohydrate ratio (CR) assesses or quantifies the exact amount ofinsulin needed to compensate for the consumed CHO. Optionally, theassessed CR adjusts the time (in the present invention preferably 3hours) anticipated for the glucose levels to return to the level thatwas at the meal time. In practice, patients are not consistent in thedaily routine (which sometime causes the settings inserted in the pumpto be inappropriate). In many cases, the appropriate CHO to insulinratio will vary and diverge from parameter being set in the insulinpump. In many times, this diverge relates to the fact the patients donot estimate correctly the amount of CHO in the meals they consume.Hence, the unsupervised learning CR algorithm of the present inventionaddresses the need for CR determination with is determined or adjustsaccordingly.

FIG. 12 is a flow chart 400 illustrating a method for unsupervisedlearning of the carbohydrate ratio (CR) in accordance with an embodimentof the invention. The unsupervised CR learning method 400 includesobtaining sectioned data from the raw log data of glucose measurements,meal events and insulin delivered 410. CR learning method 400 can usethe MS Sections of the data to obtain informative data pieces asfollows. The sectioning procedures were provided above and areapplicable in the present context. The method 400 further includesdetermining plurality of glucose level and paired practical carbohydrateratios. The application of the method 400 thus produces pairs of glucoselevel and candidate carbohydrate ratio 420. In procedure 430,carbohydrate ratio (CR) is learned from the candidate practicalcarbohydrate ratios which were previously determined. These candidatepractical carbohydrate ratios are informative pieces with are furtherprocessed to obtain final CR as follows. In some embodiments, polynomialanalysis 432 of the paired practical carbohydrate ratios is applied. Inother embodiments, outliner pairs from the paired candidate carbohydrateratios are determined and optionally removed before performing thepolynomial analysis 434. The resultant candidate carbohydrate ratios canbe also selected by a voting procedure (not shown) in which the agreedmajority of candidate carbohydrate ratios is used or selected as the CR.In other embodiments, combination (such as weighted combination) of bothpolynomial analysis and voting procedure is used for the determinationof a final CR. Specific example of the procedure of determining CR wasprovided above and is applicable in this respect.

In one more specific but non-limiting embodiment, carbohydrate ratio(CR) is determined according to the procedure comprising the following:

-   -   calculating the practical CR (pracCR) per MS section.    -   Practical CR (pracCR) denotes the ratio of CHO to the actually        delivered insulin. In some embodiments, the practical CR        (pracCR) is determined for the paired MS section (pracCR in the        MS section). In some embodiments, the practical CR (pracCR) is        determined for each paired MS section. These procedures result        with series of paired values: Ser={Diff(i), pracCR(i)}, (i)        being a data section enumeration, as defined below.

i) Practical Carbohydrate Ratio (pracCR) in Meal Sections:

-   -   The following method determines the pracCR for each MS section.        The method addresses the required separation or isolation of        meal effect from a bolus effect.    -   For each meal section, MS(i), in the MS sections which were        previously determined, perform a procedure comprising:    -   (1) obtain the total insulin boluses given in MS(i), denote as        B_(tot);    -   (2) calculate the active insulin (AI) at the beginning of the        section, in MS(i), denote as AI_(start); AI is determined in        accordance with an active insulin function (AIF) of the treated        patient, as can be determined from open-loop measured data        (defined herein above);    -   (3) determine the active insulin (AI) at the end of the section,        in MS(i), denote as AI_(end);    -   (4) calculate the insulin in section with        RelIins(i)=B_(tot)+AI_(start) AI_(end);    -   (5) obtain the glucose sensor value at the beginning of the        section, MS(i), denote as S_(start). In one embodiment, a single        glucose sensor value is obtained. In other embodiments, an        average of several glucose sensor values is obtained;    -   (6) obtain the sensor value at the end of the section, denote as        S_(end). In one embodiment, a single glucose sensor value is        obtained. In other embodiments, an average of several glucose        sensor values is obtained;    -   (7) calculate the difference between start and end points as        follows: Diff(i)=S_(end)−S_(start);    -   (8) obtain the total carbohydrates consumed in the section,        denote as C_(tot)(i);    -   (9) determine the practical CR for the section,        pracCR(i)=C_(tot)(i)/RelIns(i).

The active insulin function (AIF) of the treated patient can be ajust-in-time AIF setting to estimate the active insulin in the MSSection. The just-in-time AIF can be an AIF parameter just beingcalculated in time proximity to the CR calculation e.g. AIF settingcalculated for the MS section.

Following the application on meal section (i), the following seriesresults: Ser={DiffBG(i), pracCR(i)}. The series comprises blood glucosechanges in a meal section and paired determined practical carbohydrateratio.

Methods and procedure are employed to extract final carbohydrate ratio(CR) from the above obtained series. In some embodiments, prior to usethe CR extraction methods, outlier pairs are removed, thereby obtainingseries Ser which can be denoted as Ser_out={DiffBG_(out)(i),pracCR_(out)(i)}, i.e. series with omitted outliner. While theembodiment described below uses the Ser_out series, it should beunderstood that in some embodiments the Ser series can be used.

Polynomial CR extraction method: a polynomial equation of order K can befitted for the series Ser_out, and the resulting function F(*) willproduce CR_k=F(Diff). Extracted CR can be calculated from the obtainedfitted function e.g. by providing a desired input DiffBG to output theresulting CR from the fitted function. The desired difference, DiffBG,for a treated patient is typically—0 (e.g. DiffBG=0). The extracted CRcan be calculated from fitted for optimal BG difference which isDiffBG=0, as the function input. The resulted CR_m=F(DiffBG) forDiffBG=0 is the desired CR.

Voting CR extraction method: the minimal possible CR_(k) such that forany CR>=CR_(k), 75% of matching DiffBG(t) will be with DiffBG{i}>ThreshVal (for the desired Thresh Val>0). The CR_(k) that was found is thedesired CR of this extraction methods. It should be noted that theprocedure is not restricted to 75% of matching DiffBG(i) but other ratescould be used.

In some embodiments, the final learned CR can be obtained as one or as aweighted average of the above extraction embodiments.

The following non-limiting example illustrates the unsupervisedprocedures for determining the final carbohydrate ratio (CR). FIG. 4 isan exemplary meal section derived from Meal Sections (MSs) forcalculating the recommended carbohydrate ratio (CR). The data shown inFIG. 4 comprises raw log data of continuous glucose sensor readings,insulin pump delivery over time, and meal data. The top graph G₃presents the glucose level where meal events are marked using a blacktriangle. The bottom graph G₄ presents the insulin treatment, where thehorizontal line L₄ is the basal rate and the vertical lines with theblack circle is the boluses. The sections are marked in numbers and withblack frame.

In the current example, the initial CR setting in the insulin pump ofthis patient is 7 gram/units. FIG. 4 also shows the identified mealsections (MS) sections for this log data set marked as MS₁-MS₇. In FIG.5 section MS₁ of FIG. 4 is focused on. FIG. 5 shows the calculation forthe pracCR and DiffBG for section MS₁. As shown, FIG. 5 contains onlyone meal. Employing the above described method with the data marked onthe figure, the following pair is determined: pracCR=7 gram/units andDiffBG=−187 mg/dl.

In FIG. 6 section MS₄ of FIG. 4 is focused on. FIG. 6 shows MS₄ which isan example for a meal section that contains more than one meal. The topgraph G₃ presents the glucose level where meal events are marked using ablack triangle. The bottom graph G₄ presents the insulin treatment,where the horizontal L₄ line is the basal rate and the vertical lineswith the black circle is the boluses. Employing the above describedmethod with the data marked on the figure, the following pair isdetermined: pracCR=2 gram/units and DiffBG=−200 mg/dl.

FIG. 7 is a plot diagram of the pairs Ser {DiffBG(i), pracCR(i)}calculated for MSs, MS₁,-MS₇. The blue line L₅ is the result of thepolynomial analysis while the horizontal green line L₆ is the result ofthe voting analysis. After conducting determining the Ser={DiffBG(i),pracCR(i)} of MS₁-MS₇ in accordance with the above methods the final CRcan further be derived. FIG. 7 shows the scatter plot of Ser, with theanalysis of polynomial method (resulting with graph L₅) and the votingmethod (resulting with graph L₆). The determined final CR for thisexample is about 5 gram/units resulting from weighted combination ofboth polynomial method and the voting methods.

By way of a non-limiting example, for the determination of CR,polynomial and voting technique can then be applied to identify arepresentative or final CR, techniques which have already beendiscussed. The selected final CR settings statistical significance stemsfrom the fact that it was obtained from sampled raw data sections whichare sectioned specifically for that determination and because of partialcontribution of the different data pieces in the sectioned data input.

In some embodiments, the present invention relates to a carbohydrateratio module; the carbohydrate ratio module is configured and operableto perform the procedures for unsupervised learning of the carbohydrateratio; the carbohydrate ratio module is configured and operable toanalyze MS being provided as input; the input is processed to produceoutput signal indicative of global insulin pump settings of carbohydrateratio (CR) parameter.

Learning CF Algorithm

The correction factor (CF) is measured in units of [mg/dL/Unit]. Thelearning procedures of the present invention are provided herein belowand address CF extraction in several scenarios (or data sections).

FIG. 13 is a flow chart 500 illustrating a method for unsupervisedlearning of the carbohydrate ratio (CF) settings in an embodiment of thepresent invention. The unsupervised CF learning method 500 includesobtaining sectioned meal and non-meal sections from raw log data ofglucose measurements, meals events and insulin delivered 510. CFlearning method 500 can utilize MS and BS data sections to obtaininformative data pieces as follows. The obtained information pieces areused for the performance of a procedure 550 which determines the finalcorrection factor setting. In some embodiments, the method 500 comprisesdetermining plurality of correction factors each being paired to a mealsection or a non-meal section, in accordance with active Insulinkinetics derived from the raw log data (555, 560 respectively).

In some embodiments, the method 500 comprises determining a correctionfactor in accordance with an adjustment factor which is determined, andthe glucose acceptable ranges 565.

In some embodiments, final CF pump setting is selected from theplurality of correction factors. In other embodiments, correctionfactors of the plurality of correction factors are weighted and thecombination of weighted correction factors can be used to produce afinal CF pump setting.

CF extraction in several scenarios and/or data sections is provided asfollows:

A. CF extraction from meal sections (MS) (denoted as CF_(from) _(—)_(MS)): raw log data from this MS sections as well as the new calculatedCR are used for the CF extraction.

In general, when a treated patient consumes a meal, the amount ofinsulin to be delivered includes two parts: (i) meal bolus (calculatedwith the CR settings of the insulin pump) and (ii) correction bolus(calculated with the current blood glucose (BG) level of the treatedpatient, CF settings of the insulin pump and the preset target level).

Normally, a correction bolus will be added only if the BG level at thebeginning of the meal event is out of the target range. In case theamount of insulin that was delivered is sufficient, the glucose levelfollowing several hours from the meal time should be close to the targetlevel. In case the blood glucose following several hours (optionally 3hours) is not close to the target, a modified CF is required. As the CRas described above is accurate, the meal bolus component is accurate,and therefore deviation from the glucose target is attributed to thesecond CF dependant component.

Correction factor determination for section MS(i) can be performed byemploying the following method:

(1) determining the Insulin that was given at section MS(i) which can beoptionally calculated as follows:

$I_{{given},i} = {{A.I_{{start},i}} + {\sum\limits_{in\_ section}{Insulin\_ Bolus}_{1}} - {A.I_{{end},i}}}$

where: A.I_(start) and A.I_(end) is the active insulin at the beginningand at the end of section MS(i), calculated using the patient dependantAIF or other methods for determining AIF disclosed herein.

(2) determining the amount of insulin that should be delivered to coverthe CHO in section MS(i); In some embodiments, the insulin to bedelivered is determined according to the following formula:

$I_{{{modified\_ for}{\_ meal}},i} = \frac{{Total\_ Carb}_{i}}{{CR}_{New}}$

In some embodiments, CR_(new) is being the final CR determined inaccordance with the CR learning procedure disclosed herein.

(3) In case the glucose level at the beginning of section MS; is not inthe target zone, i.e. in case there is a need for correction bolus, thefollowing calculation is used:

$\mspace{20mu} {I_{{additional\_ correction},\; i} = \frac{{BG}_{{end},i} - {Target}}{{CF}_{originial}}}$I_(estimated_correction_needed, i) = I_(given, i) − I_(modified_for_meal, i) + I_(additional_correction, i)$\mspace{20mu} {{CF}_{{new},i} = \frac{{BG}_{{start},I} - {Target}}{I_{{{estimate\_ correction}{\_ needed}},i}}}$

The resulted CF_(from) _(—) _(MS) can be used for setting the insulinpump accordingly. The resulted CF_(from) _(—) _(MS) for the aboveprocedure can be the average of several CF_(new,i) being calculatedaccording to the above procedure.

In some embodiments, a correction factor (CF) is determined for the mealand is calculated by processing the AIF to estimate the active insulinin the MS Section and a just-in-time carbohydrate ratio (CR), previouslydenoted as CR_(new). The utilization of a just-in-time carbohydrateratio allows for better estimation of the CF being calculated as thecalculation is based on an updated value of the CR.

FIG. 8 presents a non limiting example for calculating the CF for a mealsection according to this algorithm. The top graph G₅ presents theglucose level (line L₇) where meal events are marked using a blacktriangle. The bottom graph G₆ presents the insulin treatment, where thehorizontal line L₈ is the basal rate and the vertical lines with theblack circle is the boluses.

The inputs in the example of FIG. 8 are as followed: CF_(original)=16mg/dl/units; CR_(original)=7 gram/units; CR_(new)=5 gram/units; Carb=80gram; and Target=110 mg/dl.

Application of the above CF extraction procedure is produced thefollowing determinations:

$\mspace{20mu} {I_{{given},i} = {{\sum\limits_{in\_ section}{Insulin\_ Bolus}_{i}} = {{16.3 + 5.7} = 22}}}$$\mspace{20mu} {I_{{{modified\_ for}{\_ meal}},i} = {\frac{{Total\_ Carb}_{i}}{{CR}_{New}} = {\frac{80}{5} = 16}}}$$\mspace{20mu} {I_{{additional\_ correction},\; i} = {\frac{{BG}_{{end},i} - {Target}}{{CF}_{orginial}} = {\frac{178 - 110}{16} = 4.25}}}$I_(estimated_correction_needed, i) = I_(given, i) − I_(modified_for_meal, i) + I_(additional_correction, i) = 17.6 − 16 + 4.25 = 5.85$\mspace{20mu} {{CF}_{{new},i} = {\frac{{BG}_{{start},i} - {Target}}{I_{{{estimated\_ correction}{\_ needed}},i}} = {\frac{290 - 110}{5.85} = 30}}}$

It should be noted that although the treated patient requires more unitsof insulin in order to come near the target level, the CF is increasing.It can be explained from the fact that some of the missing insulin unitscan be traced back to the meal component (since the CR changed from 7 to5, thus the meal component of insulin increases). Therefore, the systemdecides to deliver less for the correction portion of insulin.

The above example with reference to FIG. 8 shows determination of the CFfor a single MS section. Following the analysis of all meal sections,the CF_(From) _(—) _(MS) obtained was 19 (not shown).

B. CF extraction from non-meal sections (denoted as CF_(non) _(—)_(meal)): raw log data from non-meal sections are used for the CFextraction. This method uses as input raw log data sections being BSsections or other sections which do not have the effect of meal. CF isextracted from the response to different dosing of boluses. The methodcomprises the following procedures. For a BS(i) section:

(1) determining the active insulin at the beginning of the BS(i) sectionusing an AIF. AI_(start) denotes the active insulin at the beginning ofthe BS(i) section. In some embodiments, the AIF is the patient dependentAIF which was previous determined. In some embodiments, the AIF isdetermined by employing the method disclosed herein for thedetermination of an AIF, at the beginning of the section

(2) determining the active insulin at the end of the BS(i) section,denoted as AI_(end).

(3) determining the total insulin boluses given in the BS(i) section,denoted as B_(tot).

(4) determining the sensor value at the beginning of the BS(i) section,denoted as S_(start).

(5) determining the sensor value at the end of the BS(i) section,denoted as S_(end).

(6) Determining CFsec(i) using the following equation:

CF _(sec)(i)=(S _(end) −S _(start))/(B _(tot)+AI_(start)−AI_(end))

Optionally, the above procedure is performed for each BS(i) section.

In some embodiments, the final CF_(non-meal) is an average over thepositive elements in CF_(sec)(i). In some embodiments, the finalCF_(non-meal) is CF_(sec)(i) of the BS(i) section.

C. Fixed CF extraction with glucose levels adjustment (denoted) asCF_(BG) _(—) _(Analysis)): The method estimates the CF using a fixedratio of dC and analyzes the glucose control performances of the patientin order to modify the fixed ratio calculation. In some embodiments, aninitial CF, denoted as CF_(initial). can be determined according tocarbohydrate amount consumed, glucose measurements and insulin relateddata (insulin delivered, the basal plan and/or insulin bolus). Thedetermination of CF_(BG) _(—) _(Analysis) can be performed as follows:(1) determining the initial. Correction. Factor. CF_(initial), inaccordance with carbohydrate amount consumed, glucose measurements andinsulin related data:

${{CF}_{initial} = \frac{G_{e} - G_{s} + {{dC} \cdot C}}{B}},$

where G_(e) is the last sensor reading [mg/dl] of the available data(could be one point or average of several points); G_(s) is the firstsensor reading [mg/dl] of the available data (could be one point oraverage of several points); dC is a glucose to carbohydrate ratio. Theratio of glucose to carbohydrate can be 3.33, (based on empiricalknowledge); C is amount of carbohydrate consumed [e.g. gr] during theavailable data; and B is the amount of bolus insulin provided [units ofinsulin] during the available data. The use of dC is done in order toestimate an effect of the consumed CHO on the glucose levels.

G_(e) and G_(s) are being measured at two different time points.Therefore, the time interval between the two glucose sensor readings canbe defined as a time window.

Such estimation can be performed by obtaining an amount of carbohydrateconsumed in the time window and transforming the carbohydrate amount bydetermining a coefficient defining the proportion of consumedcarbohydrate to glucose (dC above). By multiplying the coefficient withthe amount of carbohydrate consumed in the time window, the glucosederived from the consumed carbohydrate is determined.

The unsupervised learning procedure of the present invention can includemodification of the CF_(initial) (or a current Correction Factor) basedon analysis of the quality of glucose control of the patient using theraw log data that was collected while the patient was at home in hisdaily routine.

For example, the CF_(initial) is modified in accordance with the minimumsensor reading or the lowest blood glucose reading recorded. In aspecific example, the CF_(initial) is modified in accordance withproportion between minimum sensor reading during the time window and thelowest blood glucose reading recorded. In some embodiments, the insulinsensitivity is modified in accordance to the maximum sensor reading in atime interval prior to obtaining the minimum sensor reading (an exampleis shown below). Therefore, CF_(initial) can further be modified inaccordance with certain factor (a) to produce a modified correctionfactor CF_(BG) _(—) _(Analysis) in accordance with the formula: CF_(BG)_(—) _(Analysis)=aCF_(initial) wherein factor (a) is defined as thefactor of modification of CF_(initial) (or a current Correction Factor).The below procedure can be performed with respect to sectioned data.

Factor (a) may be determined, according to the following procedure:

If T_(hypo)>0 or T_(ihypo) > 1  If (S_(peak)>S_(min)) and (S_(peak)>UpperLimit)   a = (S_(peak) − S_(min))/ (S_(peak) −UpperLimit);  Else  a = UpperLimit/S_(min);  End Elsewherein T_(hypo) is a percent of time spent in a defined hypoglycemiarange during the relevant period/section; T_(ihypo) is a percent of timespent in defined impending hypoglycemia range during the relevantperiod; S_(min) is a minimum sensor reading during the relevant period;S_(mean) is the average sensor readings during the relevant period;S_(max) is a maximum sensor reading during the relevant period; S_(peak)is a maximum sensor level in time range of up to three hours before theS_(min) time, during the relevant period/section; Upper unit is thelowest blood glucose reading that is recorded neither during impendinghypoglycemia nor hypoglycemia; Sn_low is the lower boundary of “strictnormal” glucose range (can be empirically defined as the glucose rangein the range of about 80-120 mg/dl), which is typically set to be 80;Sn_high is the higher boundary of “strict normal” glucose range, whichcan be set to be 120; dN is the subtraction Sn_high−Sn_low.

A histogram (or alternatively, a distribution function) can bedetermined by using the measured glucose levels of the treated patient.The histogram is a function representing occurrences of each measuredglucose level of the patient during a certain time window or section.Parameter P can be defined as the summation of the occurrences (or anaccumulated measured glucose levels) at an interval of a specific width(dN representing glucose measurement interval), wherein v is the initialglucose reading in the specific window, individualized for the treatedpatient.

val=arg max_(v){P(v, v+dN)}, where P(v, v+dN) is the percentage ofglucose readings with the range [v, v+dN]; argmax_(v), means determiningthe v where P reaches maximum value.

Factor (a) may be thus determined as follows:

a=0.57·a _(—) Tsn+0.28·a_Hyper+0.15·a_Mean

where a_Tsn=sn_low/val; a_Hyper=180/Smax; typically defined empirically;and a_Mean=110/Smean; typically defined empirically; W=[0.57 0.28 0.15],is a weighing vector/coefficients, typically defined empirically.

-   -   End

The person skilled in the art would appreciate that the weighing vectorcan be adjusted or modified to suit particular insulin treatments. Insome embodiments, a histogram representing the occurrence of measuredglucose level of the patient during a certain time window can thus bedetermined. The local maximum (or peak) in a glucose measurementinterval can then be obtained, for example by maximizing the functionP(v, v+dN) as exemplified above.

In some embodiments, final CF is calculated as one or as a weightedaverage of the above calculated CF values (i.e. CF_(from) _(—) _(MS),CF_(non-meal), CF_(BG) _(—) _(Analysis)) with majority similar trend. Inthis respect, similar trend means that all CFs values recommend eitherincreasing or decreasing the value of the CF compared to the currentpatient's CF. In some embodiments, final CF is calculated as one or as aweighted average of the above calculated positive CF values. In someembodiments, final CF is calculated as one or as a weighted average ofthe above calculated CF values which determine increase of the CF. Insome embodiments, final CF is calculated as one or as a weighted averageof the above calculated CF values which determine decrease of the CF.

Settings the Glucose Targets

In some embodiments, the above described technique of the inventionutilizes the glucose ranges presented below which have been arrivedempirically.

TABLE 2 Pump target settings High Low Hours Age Group [Years] 150 11000:00-19:00 0-6 150 150 19:00-00:00 120 100 00:00-20:00  6-12 150 15020:00-00:00 110  90 00:00-21:00 12-19 130 130 21:00-00:00 100  9000:00-22:00 Adult (19+) 120 120 22:00-00:00

Table 2 represents general clinical guidelines for treated patients pumpsettings using the technique of the present invention.

In some embodiments, the present invention relates to an CF module; theCF module is configured and operable to perform the procedures forunsupervised learning of correction factor (CF); the CF module isconfigured and operable to analyze MS being provided as input; the inputis processed to produce output signal indicative of global insulin pumpsettings of correction factor (CF) parameter. In some embodiments, theCF module is configured and operable to analyze BS being provided asinput; the input is processed to produce output signal indicative ofglobal insulin pump settings of correction factor (CF) parameter. Insome embodiments, the CF module is configured and operable to analyze BSand MS both being provided as input; the input is processed to produceoutput signal indicative of global insulin pump settings of correctionfactor (CF) parameter.

Monitoring System

Reference is made to FIG. 9 which is a schematic block diagramillustrating a non-limiting example of a monitoring system (or device)100 in accordance with one embodiment of the present invention. Thedevice 100 is typically processor-based and includes inter alia a memoryutility 125, data input and output utilities (not shown), and a dataprocessor utility. The latter is configured as or comprises as a partthereof an unsupervised learning controller 110 of the invention whichprovides retrospective analysis of raw log data 105, which is input intothe device 100 while in a machine readable format, via a communicationinterface 120. The input to the controller 110 is unsupervised input,and the controller calculates the global insulin pump settings from theunsupervised input i.e. raw data input.

The communication interface 120 is appropriately configured forconnecting the processor utility 110, via wires or wireless signaltransmission (e.g. via communication network(s)), to either ameasurement device supplying the raw log data or to an external memory(database) where such raw log data have been previously stored (beingsupplied to from measurement device(s)), In some embodiments, the rawlog data 105 includes one of glucose sensor reading/levels as a functionof time, meal event data as a function of time, and insulin deliverydata as a function of time. Therefore, the raw log data 105 can be inthe form of time space data points.

The raw log data 105, in some embodiments, adheres to or is in the formof a predetermined time pattern 125. The time pattern 125 typicallycomprises plurality of timestamps. A timestamp, as described herein, isa string or other object which is used to connote time such as day,hour, minutes etc′ along a certain time window. The plurality oftimestamps is used to obtain raw log data 105 including itemscorresponding to the time pattern 125. By way of a non-limiting example,raw log data of basal rate can take the form of <time stamp, basal rate>or <a period of time/time slot, basal rate>. Raw log data 105 of insulindelivery can be provided in the form of <time stamp, insulin dose>. Rawlog data 105 of meal event can be provided in the form of <time stamp,COH consumed>. The person skilled in the art would appreciate that thereare variety of ways to encode such information and the particularencoding regime can be determined for such purpose. In some embodiments,raw log data 105 adheres to a predetermined time pattern 115 which isexternally provided i.e. being communicated to the device 100 by wiredor wireless means.

The learning controller of device 100 can perform procedures andanalysis without human supervision of cooperation. In this connection,it should be understood that the unsupervised learning controller ofdevice 100 can calculate the global insulin pump settings from input rawlog data and not from manually input data by a user (touch pad or keypad input). In other words, the system of the invention can beconfigured for automatic or semi-automatic operation via direct contactwith the data records where the raw log data can be accessed. Thecalculation procedure does not include variable assignment(s) of manualinput queries or responses to queries from users to the controller(patient or physician). In some embodiments, the unsupervised learningcontroller of device 100 calculates the global insulin pump settingsduring one continuous time window which is initiated at acquiring theraw log data and terminates after calculating any of the global insulinpump settings i.e. not enabling interruptions (e.g. asynchronous) forobtaining user input to the controller during the calculation procedure.

The unsupervised learning controller is configured and operable toreceive and process said raw log data, to determine an informative datapiece from residual log data portion of said raw log data and selectsaid informative data piece for retrospectively analyzing andcalculating at least one of basal rate or basal plan, correction factor(CF), carbohydrate ratio (CR) and insulin activity curve parameters andgenerate an update for insulin pump settings.

In some embodiments, the device 100 is used for diabetic treatmentmanagement and comprising a communication interface 120 configured andoperable to permit access to stored data being time spaced data pointsof glucose measurements, meals consumed and insulin delivery. The device100 further includes a control unit comprising a data processor utilityor processor 110 for providing retrospective analysis of said data anddetermining at least one global insulin pump setting of basal rate (orbasal plan), correction factor (CF), carbohydrate ratio (CR) and insulinactivity curve parameters, wherein said processor utility is operable todetermine each of said parameters by processing a data piece of saidreceived data corresponding to a selected time slot of said certainperiod of time. The manner of obtaining data corresponding to a selectedtime was already referred to above with regard to Initial Data Analysisand Sectioning.

The analysis being performed by the unsupervised controller can thusinclude sectioning the stored data or the raw log data input, thus,obtaining stored data within a predetermined time window. Where thepredetermined time window is a Basal data Section (BaS), the calculatedinsulin pump settings being selected is basal rate or basal plan. Wheresaid predetermined time window is a Meals data Section (MS) thecalculated insulin pump settings being selected from being ActiveInsulin Function (AIF), correction factor (CF) or carbohydrate ratio(CR). In case, the predetermined time window is a Bolus data Section(BS) the calculated insulin pump settings being selected from correctionfactor (CF) or Active Insulin Function (AIF).

In some embodiments, the system (or device) 100 or the unsupervisedlearning controller 110 is configured and operable to perform at leastone of the unsupervised learning retrospective analysis procedures ormethods, for example, those of methods 200, 300, 400, 500 or 600. Theunsupervised learning procedures should be understood as those whichdetermine insulin pump settings from raw log data as defined abovewithout human participation during analysis which arrives to the finalcalculation. The unsupervised learning controller 100 merely requiresraw data being accumulated during the everyday routine activities of thetreated patient without any special procedural requirement. In thisrespect, raw log data is log recordation being performed during regularroutine activity of the patient irrespective of any assumed testing orother premeditated assumption relating to the specific patient orphysician (i.e. a unsupervised controller permitting analysis of userindependent procedure/method or with a user cooperation/participation).

A computer program is also provided optionally recordable on a storagemedium and comprising a machine readable format, the computer programbeing configured and operable to, when being accesses, carry out atleast one of the unsupervised learning retrospective analysis proceduresor methods, for example, those of methods 200, 300, 400, 500 or 600. Insome embodiments, the computer program is being configured and operableto carry out identifying raw log data input corresponding to a certaintime period and comprising glucose measurements, meals events andinsulin delivery; determining an informative data piece and residual logdata portion of said raw log data; selecting said informative data pieceand calculating therefrom at least one of basal rate, correction factor(CF), carbohydrate ratio (CR) and insulin activity curve parameters, andgenerating output data comprising values for global insulin pumpsettings

The terms processor module and micro/processor unit are used hereininterchangeably, and furthermore refer to a computer system, statemachine, processor, or the like designed to perform arithmetic or logicoperations using logic circuitry that responds to and processes theinstructions and that drive a computer.

In one embodiment, the device is an insulin pump. In some embodiments,the device provides a close-loop insulin management for the user. Theunsupervised control unit automatically can determine the insulin pumpsettings such as at least one of basal rate (or basal plan), correctionfactor (CF), carbohydrate ratio (CR) and insulin activity curveparameters.

The techniques and system of the present invention can findapplicability in variety of computing or processing environments such acomputer or a process based environments. The techniques may beimplemented in a combination of the software and hardware. Thetechniques may be implemented in programs executing on programmablemachines such as stationary computers being configured to obtain raw logdata as also been described above. The techniques may be implemented bysimilar devices that include a processor, a storage medium readable bythe processor, at least one input device to manage raw log data, and oneor more output devices to determine of insulin pump settings, Programcode is applied to the data entered using the input device to performthe techniques described and to generate the output information. Theoutput information can then be applied to one or more output devices.

Each program may be implemented in a high level procedural or objectoriented programming language to communicate with a processed basedsystem. However, the programs can be implemented in assembly or machinelanguage, if desired.

In other embodiments, the methods and systems of the present inventioncan be utilized over a network computing system and/or environment.Number of computer systems could be coupled together via a network, suchas a local area network (LAN), a wide area network (WAN) or theinternet. Each method or techniques of the present invention such asthat of 200, 300, 400, 500 or 600 as a whole or a functional stepthereof could be thus implemented by a remote network computer or acombination of several. Thus, any functional part of system 100 can beprovided or connected via a computer network. By way of non-limitingexample, the system may be remote to provide the insulin pump settingsover the network optionally to a network user. In addition, theunsupervised processor module can also be remotely providing theprocessor services over a network. In this respect, service relates tosuch as that of methods 200, 300, 400, 500 or 600.

In some embodiments, the system (or device) 100 include the sectioningmodule. In some embodiments, the unsupervised learning controller 110comprises the sectioning module.

In some embodiments, the system (or device) 100 include the basal planmodule. In some embodiments, the unsupervised learning controller 110comprises the basal plan module.

In some embodiments, the system (or device) 100 include the carbohydrateratio module. In some embodiments, the unsupervised learning controller110 comprises the carbohydrate ratio module.

In some embodiments, the system (or device) 100 include the AIF module.In some embodiments, the unsupervised learning controller 110 comprisesthe AIF module.

In some embodiments, the system (or device) 100 include the CF module.In some embodiments, the unsupervised learning controller 110 comprisesthe CF module.

In one embodiment, a monitoring system for use with diabetic treatmentmanagement is provided such that it is deployed on a network computersuch as a server which permits communication with user across thenetwork. The monitoring system includes a communication interfaceconfigured and operable to permit access to stored raw log data obtainedover a certain time and being indicative of glucose measurements, mealsevents and insulin delivery. The raw log data input can thus becommunicated to the server over the network. This can take the form ofuploading the entire or part of raw log data input to the monitoringsystem. The system further includes a control unit comprising anunsupervised learning controller (or module) configured and operable toreceive and process said raw log data, to determine an informative datapiece from residual log data portion of said raw log data and selectsaid informative data piece for processing to determine at least one ofbasal rate (or basal plan), correction factor (CF), carbohydrate ratio(CR) and insulin activity curve parameters and generate an update forinsulin pump settings.

Each such program may be stored on a storage medium or device, e.g.,compact disc read only memory (CD-ROM), hard disk, magnetic diskette, orsimilar medium or device, that is readable by a general or specialpurpose programmable machine for configuring and operating the machinewhen the storage medium or device is read by the computer to perform theprocedures described in this document. The system may also beimplemented as a machine-readable storage medium, configured with aprogram, where the storage medium so configured causes a machine tooperate in a specific and predefined manner.

Referring now to the following figures, there are described embodimentsof the present invention, relating to a monitoring system which includesthe control unit of the system 100 described above, as well asadditional components for additional processing of other relevant data.Such components receive the output of the system 100 and are configuredfor generating a treatment recommendation accordingly. The treatmentrecommendation may be either sent automatically to the insulin pump 24or may be presented to an authorized person (e.g. a physician or thepatient) through a user interface for choosing whether to apply thetreatment recommendation or not.

Referring to FIG. 15, a non limiting example of another embodiment of amonitoring system 700 is shown. The global insulin pump settings aredetermined by the procedure described above, based on Raw log data 105that is sent to the unsupervised learning controller 110 via thecommunication interface 120, and processed by the unsupervised learningcontroller 110.

In addition to the global insulin pump settings, other relevant datastored in a memory utility 702 (denoted as history log data andreal-time data 702) is entered together with the global pump settingsinto further processing in the additional processing unit(software/hardware utility) 30. The other relevant data comprisesreference data, including individualized patient's profile related data,and individualized patient's treatment history related data, such asinsulin sensitivity, glucagon sensitivity, insulin/glucagonpharmacokinetics associated data, and glucose target level or targetrange level. The processing unit 30 comprises a first processor module34 (referred in the figure as Data Analysis), and a second processormodule 36, herein also denoted as control to range module (CRM).

The first processor module 34 is configured for processing measured dataindicative of blood glucose level and generating first processed dataindicative thereof. The second processor module comprises a fuzzy logicmodule; the fuzzy logic module receives input parameters correspondingto the measured data (data measured in real time, optionally stored inthe memory utility 702), the first processed data (data processed by thedata analysis module 34) and the reference data (including the globalpump settings data from the unsupervised controller 110). The fuzzylogic module then processes the received parameters to produce at leastone qualitative output parameter indicative of patient's treatmentparameters, which in some embodiments can be a first treatmentsuggestion followed by more processing. The processing unit 30 may alsoinclude a control to target module (CTM) 38 for final determiningwhether any of the patient's conditions/treatment is to be modified. Asexplained above, the final output is may be sent directly andautomatically to the pump 24 or the drug injection device, or can bepresented as a recommendation, through a suitable user interface,visually, audibly or else, to let the user (e.g., a patient 704 or amedical professional) decide whether to accept and apply therecommendation or not.

Measured blood glucose (BG) level from a measurement device (eitherdirectly measured or predicted from measured tissue glucose level, asthe case may be) enters the processing unit 30.

The second processor 36 receives quantitative input parameterscorresponding to the measured data, the first processed data and thereference data (including the global pump settings data), and processesthe received quantitative parameters to produce qualitative outputparameters indicative of patient's conditions and enabling to determinewhether any of these conditions is to be modified. Output of the dataanalysis module 34 (first processed data) is processed by the fuzzymodule of the second processor 36. The qualitative output parameters ofthe fuzzy logic module 36 are then processed by a third processor modulewhich can be also denoted as the CTM 38 to determine whether any of thepatient's conditions/treatment is to be modified. The final decisionrelating data from module 38 may be used for updating reference data inthe memory utility 702.

Measured data may also include special event, such as meals, physicalactivity, sleep time etc.

Reference is now made to FIG. 16 exemplifying a flow diagram of a methodof the present invention for automatic monitoring of diabetes-relatedtreatment. FIG. 16 particularly relates to the operation of theprocessing unit 30. Generally, the method comprises analyzing datagenerated by at least one of drug delivery devices and glucosemeasurement devices; identifying patient's conditions; and decidingabout treatment modification by controlling the operation of the druginjection devices to enable real-time automatic individualizedmonitoring of the treatment procedure.

In some embodiments, analyzing the data comprises providing referencedata (step 820). The reference data includes patient's profile relateddata 701; treatment history related data 824, and a structure of rulesor “table of rules” settings 822. The structure of rules settings arebased on the physician approach of evaluating the measurements. Thepatient's profile related data 701 includes a set of parameters (andcalibratable or updatable during the monitoring procedure or during thetreatment) about the patient's condition. The patient profile relateddata 701 is extracted from collecting data several days prior toconnecting the patient to the monitoring system, and includes the globalpump settings data from the unsupervised controller 110.

In some embodiments, the set of parameters is automatically modified bya learning algorithm.

In some embodiments, the treatment modification comprises at least oneof the followings: controlling an individualized basal plan; controllingpatient specific insulin sensitivity for glucose levels (referred as a“correction factor”) indicative of the correction of the current bloodglucose level to a target level and of the amount of insulin/and orglucagon to be delivered; controlling the individualized blood glucosetarget level; controlling the insulin and/or glucagon pharmacokineticssettings to determine the sensitivity of each patient to insulin and/orglucagon respectively.

More specifically, at least one of the followings conditions iscontrolled:

(1) Basal Plan: The rate of insulin to be injected to the patient duringan entire day, according to the time of the day. For example, type 1patient receives a continuous dose of insulin during the day. This dosecan be changed during the day, depending on the change in the patientsensitivity to insulin. Basal Plan can be represented as a series ofindividualized basal treatment rates as a function of time. The role ofthe basal treatment is to treat with the endogenic release of glucose bythe liver. Therefore, an optimal basal plan will keep the glucose levelsstable.

(2) Correction Factor (CF) Insulin/Glucagon Plan: The following equation(1) is used to correct the current BG level to the target level (definedas a reference level for Insulin/glucagon calculation) and to calculatethe Insulin/Glucagon bolus:

$\begin{matrix}{{{CorrectionBolus}( {{Insulin}\text{/}{Glucagon}} )} = \frac{{abs}( {{CurrectBG} - {Target}} )}{CF}} & (1)\end{matrix}$

Due to the change insensitivity to Insulin/Glucagon, the CF can be setfor each hormone according to the time of the day.

(3) BG Target—The blood glucose level target is defined per patient as areference level to be used for example for the correction of theInsulin/Glucagon bolus.

(4) Insulin/Glucagon Pharmacokinetics (PK) Settings: A precaution curveis developed to determine the sensitivity of each patient toInsulin/Glucagon, as will be detailed below.

(5) Optionally, the structure of rules settings of the fuzzy logicmodule such as categorized blood levels (e.g. very low, low, normal,normal high, high and very high) as will be detailed below.

Turning back to FIG. 16, the measured data 801 (being a part of the data702 of FIG. 15) is indicative of the BG level at a certain period oftime, being directly measured in the blood or the subcutaneous tissue.

The analyzing of the data is carried out by processing measured data 801in the data analysis 34 and generating first processed data indicativethereof (step 802). A fuzzy logic model is applied (step 812) toquantitative input parameters (step 810) corresponding to the measureddata 801, the first processed data by using a structure of rulessettings to produce qualitative output parameters indicative ofpatient's conditions.

In some embodiments, processing of the measured data (step 802) includescalculation of a past trend in a glucose level change (step 804),predict the future BG level value (step 806), and using the predictionresults to calculate a future trend (step 808).

In this connection, it should be understood that the glucose past/futuretrend is a parameter influenced by three factors: (i) the average rateof change in the glucose level in mg/dl per minute in a certain timewindow (i.e. the average rate of change), (ii) the course of change(i.e. ascending or descending) and (iii) the duration of this course.

The quantitative input is a vector of parameters supplied from themeasured data relating modules 801, 804, 806 and 808.

For example, the quantitative input include the followings fourparameters: the past trend, the future trend, the current BG level andthe predicted level of the BG.

The fuzzy logic processing 812 is utilized to transform, using thestructured of rules settings, the quantitative input vector toqualitative output vector (e.g. multiple vector) (step 814) denoted asFuzzified input vectors indicative of the patient's condition. In somecases, multiple Fuzzified input vectors are obtained from the fuzzylogic processing and each Fuzzified input vector is associated with amatching rule (step 816) of the “table of rules” defined above. In thesecases, each matching rule is assigned with a statistical agreementfactor which describes to what degree each rule is applied. All appliedrules are stacked according to their statistical agreement and a deFuzzyFunction calculates the deFuzzified Output Vector (step 818) whichincludes the fuzzy logic recommendation to changes in the treatment inpercentages.

For example, the following input vector: [0.7 110 2 170] is interpretedas follows: in the last 20 minutes, the trend was 0.7 [mg/dl/min], thecurrent blood glucose level is 110 [mg/dl], the predicted trend of theblood glucose level is 2 [mg/dl/min] and the predicted value in the 30minutes is 170 [mg/dl]. When this input vector goes through the fuzzylogic module of the CRM 36, it is translated to the following Fuzzifiedinput vectors:

1. [High Normal VeryHigh NormalHigh]

2. [High Normal VeryHigh High]

These Fuzzified Input Vectors match rule number 73 (73% agreement) andrule number 204 (27% agreement). Both of these rules outputs take intoconsideration and their output member functions be stacked according totheir weight (i.e. their statistical agreement percent).

The deFuzzy Function calculates the center of weight of those stackedfunctions (for each of the outputs separately) to weight all therelevant rules and gives the following deFuzzified Output Vector: [502.59 0]

Generally, each rule includes a modification of the current treatmentdelivered to the patient, adapted to a specific patient conditionindicated by the Fuzzified input vector. As described above, thetreatment parameters (i.e. deFuzzified output vector) include at leastone of the following parameters: the modification of the basal rateand/or the insulin/glucagon bolus percentage. Each rule is alsoassociated with a contribution factor (weight) which designates thelikelihood of the patient's condition being associated with the specificrule, More specifically, the weight is the probability of such rule tooccur in real life, quantized to a number between 0-1. The weight canalso be determined in accordance with the importance assigned to therule. In addition, the weight may also be in accordance with a specialevent handled by the fuzzy logic engine.

The initial recommendation received from the CRM 34 is in percentage. Todetermine the dosing amount of the two outputs in units or units/hour,the CTM 36 considers the recommendation of the CRM 34 as well as theglucose target level. Special glucose dynamics analysis is then applied,assuming the dosing regimen history and safety constraints related tothe insulin pharmacodynamics, and amount of glucagon and/or insulinactive to yield the final dosing recommendation.

The current amount of glucagon and/or insulin active (G_(active),I_(active)) section in the blood is determined according to thepatient's profile 701 (step 830), as exemplified in FIG. 17,illustrating the precaution curve determining the pharmacodynamics of apatient to insulin/glucagon. This curve is indicative of the percentageof the insulin/glucagon “active” in the blood at a certain time afterthe delivery of the insulin glucagon bolus. The present inventiontherefore provides a system for use in monitoring diabetes treatment ofa patient, the system is configured and operable to modify or provide atreatment (i.e. insulin/glucagons bolus or basal treatment) inaccordance to the insulin/glucagons pharmacodynamics of the treatedpatient. In some embodiments, insulin/glucagons pharmacodynamics isrepresented by a curve or a function describing the percentage (orotherwise amount) of the insulin/glucagon “active” in the blood at acertain time after the delivery of the insulin/glucagon bolus. Moreover,the present invention also provides a method for use in monitoringdiabetes treatment of a patient. The method comprises obtaininginsulin/glucagons pharmacodynamics of the treated patient; and adjustinga treatment (i.e. insulin/glucagons bolus or basal treatment) inaccordance to the insulin/glucagons pharmacodynamics of the treatedpatient.

The amount of insulin (e.g. percentage) present in the blood isrepresented at three different period of times (P1, P2, P3)characterizing the activity of the insulin since the last bolusinjection. Similar graphs, specific to each patient, designating thepatient's absorbance (i.e. decay rates) of insulin/glucagon after bolusor basal treatment, can be generally included in the patient's profile.These decays rates may be used together with the treatment history todetermine the amount of active insulin/glucagon present in the blood.

The calculation of the active insulin and active glucagon is done by theCTM module 38 using insulin and glucagon treatment history 824 and thepatient's individual pharmacodynamics of glucagon and insulin taken fromthe patient profile 701, as detailed above.

The calculation of the active glucagon at the current moment isperformed as follows: The times and doses of glucagon are given, denotedas TG and VG, both vectors of size N. The current time is denoted by t₀.The active glucagon is denoted by G_(active). The activity function ofthe glucagon f_(G) (t) is determined by the patient individual settings:

${f_{G}(t)} = \{ \begin{matrix}P_{1} & {t \leq t_{1}} \\P_{2} & {t_{1} < t \leq t_{2}} \\\frac{P_{3}( {t - t_{3}} )}{( {t_{3} - t_{2}} )} & {t_{2} < t \leq t_{3}} \\0 & {t_{3} < t}\end{matrix} $

Where t₁₋₃, P₁₋₃ are Glucagon time constants which are individually setfor each patient, and can be learned and updated automatically by aself-learning algorithm.

The active glucagon is calculated as follows:

$G_{active} = {\sum\limits_{i = 1}^{N}{{{VG}\lbrack i\rbrack} \cdot {f_{G}( {t_{0} - {{TG}\lbrack i\rbrack}} )}}}$

Similarly, the active insulin can also be calculated at the currentmoment:

The times and doses of insulin are given, denoted by TI and VI, bothvectors of size K. The current time is denoted by t₀. The active insulinis denoted by I_(active).

The activity function of the insulin f_(I)(t) is determined by thepatient individual settings:

${f_{I}(t)} = \{ \begin{matrix}P_{4} & {t \leq t_{4}} \\P_{5} & {t_{4} < t \leq t_{5}} \\\frac{P_{6}( {t - t_{6}} )}{( {t_{6} - t_{5}} )} & {t_{5} < t \leq t_{6}} \\0 & {t_{6} < t}\end{matrix} $

where t₄₋₆, P₄₋₆ are insulin time constants which are individually setfor each patient, and can be learned and updated automatically by alearning algorithm.

The active glucagon is calculated as:

$I_{active} = {\sum\limits_{i = 1}^{K}{{{VI}\lbrack i\rbrack} \cdot {f_{I}( {t_{0} - {{TI}\lbrack i\rbrack}} )}}}$

The amounts of hormones (i.e. insulin and/or glucagon) to be deliveredis determined (step 832) by the CTM module 38 based on the initialrecommendation received from the fuzzy logic module 36 (in percentageunit), the patient's treatment history 824, the insulin/glucagonsensitivity (from the patient profile 701) and the amount of hormonesactive in the blood 830, for example as follows:

The fuzzy logic output vectors are indicative of G_(p), B_(p) and Ba_(p)being the percentage recommendations for the Glucagon, Bolus Insulin andBasal Insulin respectively. (G_(p) varies from 0 to 100 [%], B_(p)varies from 0 to 100 [%] and Ba_(p) varies from −100 to 100 [%]). Thecorresponding amounts of Glucagon, Bolus Insulin and Basal Insulin to bereceived by the drug delivery device are denoted as G_(a), B_(a) andBa_(a). S is the last sensor reading. CF_(G) and CF_(I) are the glucagonand bolus insulin sensitivity factors, which are a part of the patient'sprofile and set individually for each patient and can be learned inreal-time. They are time-dependent and change for different times of thedays to reflect natural changes in glucagon and/or insulin sensitivity.

GT is the patient individual glucose target level.

Basically the amount of glucagon and insulin dose treatment is definedrespectively as follows:

${G_{s} = {{\frac{s - {GT}}{{CF}_{G}}*G_{p}*0.01} - G_{active}}},{B_{s} = {{\frac{s - {GT}}{{CF}_{I}}*B_{p}*0.01} - I_{active}}}$

G_(active), I_(active) being the active glucagon and insulin whosecalculation was defined above. If G_(s) is negative or G_(p) is lowerthan 50%, G_(s) is 0. If B_(s) is negative, B_(s) is 0.

Similarly, the basal treatment is defined as follows:Ba_(s)=f_(BA)(t₀)*(1+0.01*Ba_(p)), f_(BA) is the patient's basal planindicative of the basal rate for each hour of the day. The function isdefined in the patient's profile and can be defined individually foreach patient. In addition, this function can be updated by a given dataset indicative of the precedent modified treatments using the teachingsof the present invention.

Determining the glucagon bolus, basal rate and the bolus treatment,recent treatments are taken into account. t_(B) and t_(B) are the timewhich passed since the last glucagon delivery and the last bolus insulindelivery, respectively. In case, there was no glucagon delivery or nobolus insulin delivery, t_(G)=∞. and t_(B)=∞. t₀ is the current time.The response time to glucagon/insulin absorption are the constant timest_(i) determined by the activity time of the glucagon and insulin.

These are individual settings for each patient, for example as follows:

If t_(G)≦t₁G_(a)=G_(s), B_(a)=0 and Ba_(a)=0

If t₁<t_(G)≦t₂G_(a)=G_(s), B_(a)=0 and Ba_(c)=Ba_(s)=0

If t₃<t_(G), the following approach has to be adopted: BT is the glucoselevel threshold which allows bolus delivery. FB is defined as the firstbolus to be delivered typically having a relatively high value. SB isdefined as the second bolus to be delivered typically having a lowervalue than FB.

FB is true if S>BT and B_(s)>0.5 and t_(B)≦t₄. Otherwise FB is false.

SB is true if S>BT and B_(s)>0.25 and t_(B)>t₄. Otherwise FB is false.

If SB is true or FB is true then G_(a)=0, B_(a)=B_(s) andBa_(a)=Ba_(as). Otherwise G_(a)=0, B_(a)=0 and Ba_(a)=Ba_(a).

Reference is made to FIG. 18, illustrating the qualitative inputparameters definition of the fuzzy-logic module 38. These parameters areindividualized (i.e. adaptable to each patient) and they can beautomatically changed by the control unit.

For example, the qualitative input parameters include fuzzy values ofthe BG values in mg/dL categorized in six levels (very low, low, normal,normal high, high and very high) and having a low bound and a highbound. The qualitative input parameters also include fuzzy trend of theBG trends in mg/dL/min categorized in five levels (Steep Descent,Descent, Normal, Rise and Steep Rise).

The first processor module 34 preprocess the measured data 801 tocalculate trends in the glucose traces (past trend 804 and future trend808) and predict the future glucose trace 808 in a certain horizon.

Trend of glucose level is determined as follows. Trend of glucose levelcan be determined in accordance with the average rate of change inglucose levels in a certain time window. The average rate of change inglucose level in a certain time window (Avg^(•)G[t_(i)]), for example,can be calculated with a moving average method to determine theamplitude (to quantify the trend) and the course of the trend. The trendof glucose level can be used in turn to select a qualitative inputparameter which suitably describes the trend as detailed herein. A trendof glucose level determined with respect to a time zone prior to apresent time is denoted as past trend. Therefore, past trend can relateto a trend preceding a contemporary measured glucose level.

The trend duration factor can be employed to provide the trend a timemeasure of coefficient. The trend duration factor τ_(RD) can thus bedefined as follows:

$\begin{matrix}{\tau_{TD} = \{ \begin{matrix}{1,{0 \leq T_{SLTC} \leq \tau_{1}}} \\{{{2( \frac{T_{SLTC} - \tau_{1}}{\tau_{2}} )} + 1},{\tau_{1} < T_{SLTC} \leq \tau_{3}}} \\{3,{T_{SLTC} > \tau_{3}}}\end{matrix} } & (1.1)\end{matrix}$

where T_(SLTC) [min] is the point in time when the glucose trend changesfrom descent to ascent or vice versa, and τ_(i) is a time constant. Thetrend parameter is defined as a function of Avg^(•)G[t_(i)] and τ_(TD)).For example, the trend parameter can be determined as follows:calculated trend=Avg G[t_(i)])×τ_(TD).

For example, if the past BG levels in the past 20 minutes were BU=[153,140, 137, 128, 120], and the time difference between each glucosereading is 5 minutes; the Avg G[t] will be −1.33 mg/dl/min. Since thisAvg^(•)G[t_(i)] has a negative sign, it means the glucose levels aredescending. For example, if the T_(SLTC) is 45 minutes (i.e. the glucoselevels are descending for 45 minutes) then τ_(TD) is 2. Thus, thecalculated trend will be −2.66 mg/dl/min.

To predict future glucose levels, several prediction models may be usedindependently or as a combination with the monitoring technique of thepresent invention. The prediction models enable to overcome sensing anddelivery delays. The predictor output is used by the fuzzy logic module.

As indicated above, the CRM 36 uses the reference data 820 and may be aMamdani-type fuzzy logic controller with four inputs: past and futureglucose trend (B^(•)G_(Past) and B^(•){tilde over (G)}_(Future)) as wellas current and future glucose level (BG_(Curr) and B{tilde over(G)}_(Future)). For example, a set of treatment rules was developed,with two outputs for each rule: (a) change in basal rate (Ba_(P)) and(b) portion of insulin bolus (B_(P)) (in percents from the patient'sbasal plan and the calculated bolus, respectively). To translate theclinical meaning of the input parameters using the fuzzy sets of rules,each member function for the input parameters had to have an interval inwhich the function's value is 1, followed by a smooth decrease to 0outside this interval. Therefore, two-sided Gaussian curve memberfunctions were selected. For the output parameters, Gaussian memberfunctions were selected in order to prevent redundancy and to maintainthe smooth transition between member functions.

The fuzzy rules were phrased in collaboration with the medical staff.The rules were designed to keep the glucose levels stable within the80-120 mg/dl range. To evaluate the rule antecedents (i.e. the IF partof the rules), the AND fuzzy operation was used. The output(defuzzification) was calculated by a centroid method. The CRM outputtreatment suggestion was then transferred to the CTM 38.

By way of non-limiting examples, the fuzzy logic modules of the presentinvention can be implemented by using computerized engines such asMATLAB by MathWorks. Where exemplification relates to MATLAB, referenceto member function (MF) shall refer to build-in member function providedtherein.

The followings inputs are examples of the qualitative parameters thatmay be used in the fuzzy logic module of the present invention.

Input 1: past trend indicative of the calculated trend of the bloodglucose level, based on data recorded by the sensor in the past 20minutes.

Input 2: future trend indicative of the calculated trend of the bloodglucose level for the next 30 minutes, based on the predicted data.

The past trend and future trend values are classified as follow:

Steep descent—The range is defined from −5 [mg/dl/min] to −2[mg/dl/min]. The member function is defined as a Z-shaped function usingthe range borders −0.1/+0.1 respectively as the Z-Shaped functionparameters.

Descent—The range is defined from −2 [mg/dl/min] to −0.5 [mg/dl/min].

The member function is defined as a Gauss2 function using the rangeborders +0.1/−0.1 respectively and 0.075 as the variance.

Stable—The range is defined from −0.5 [mg/dl/min] to +0.5 [mg/dl/min].

The member function is defined as a Gauss2 function using the rangeborders +0.1/−0.1 respectively and 0.075 as the variance.

Rise—The range is defined from +0.5 [mg/dl/min] to +2 [mg/dl/min].

The member function is defined as Gauss2 function using the rangeborders+0.1/−0.1 respectively and 0.075 as the variance.

Steep rise—The range is defined from +2 [mg/dl/min] to +5 [mg/dl/min].

The member function is defined as an S-Shaped function using the rangeborders +0.1/10.1 respectively as the S-Shaped function parameters.

The person skilled in the art would appreciate that the ranges and timeinterval can also be modified in accordance to a particular treatment tobe envisaged.

Input 3: current blood glucose level indicative of the last bloodglucose level recorded by the sensor.

Input 4: future level indicative of the predict blood glucose level inthe next 30 minutes.

The current blood glucose level and the future level indicative of theblood glucose level are classified as follow:

Very Low—The range is defined from 50 [mg/dl] to 70 [mg/dl]

The member function is defined as a Z Shaped function.

Low—The range is defined from 70 [mg/dl] to 90 [mg/dl]

The member function is defined as a Gauss2 function.

Normal—The range is defined from 90 [mg/dl] to 140 [mg/dl]

The member function is defined as a Gauss2 function.

Normal High—The range is defined from 140 [mg/dl] to 170 [mg/dl]

The member function is defined as a Gauss2 function.

High—The range is defined from 170 [mg/dl] to 250 [mg/dl]

The member function is defined as a Gauss2 function.

Very High—The range is defined from 250 [mg/dl] to 500 [mg/dl]

The member function is defined as an S Shaped function.

All the parameters (S-Shaped and Z-Shaped functions parameters,Expectancy and Variance for the Gauss2 functions) for the memberfunctions are calculated to meet the following rules: (1) the S-Shapedand Z-Shaped functions have to meet at y=0.5; and (2) S-Shaped andZ-Shaped functions have 5% of overlapping.

The person skilled in the art would appreciate that the ranges and timeinterval can also be modified in accordance to a particular treatment tobe envisaged. The followings outputs are examples of the qualitativeoutput parameters:

Output 1: Percentage of change of basal rate i.e. basal rate indicativeof the recommended change, in percents relatively to the defaultcontemporary basal rate (0%), in the delivered basal rate. The percentchange can be between −100% (stopping insulin delivery) to 100% (doublethe default contemporary basal rate). This range can be quantized intoequally separated steps.

Output 2: Percentage of bolus indicative of the suggested percent of thecalculated insulin bolus. The percent change can be between 0% (Nobolus) to 100% (All bolus). This range can be quantized into equallyseparated steps wise ranges.

Output 3: Optionally, glucagon indicative of the suggested percent ofthe calculated glucagon. The percent change can be between 0% (NoGlucagon) to 100% (All Glucagon). This range can be quantized intoequally separated steps wise ranges.

The number of input may be from one to four inputs and the number ofoutputs may be from one to three outputs.

The structures set of rules can comprise a combination of treatmentstrategies that can be modified according to each treatment procedure.The strategies may for example overlap while other strategies may beindependent from each other. These strategies are represented by acertain relationship between the qualitative input parameters and thecorresponding output parameters. The monitoring system of the presentinvention can determine which appropriate set of rules (appropriatenumber and combination) can be used to suggest optimal outputparameter(s).

For example, the set of rules includes 96 rules, such as:

-   -   Rule #7: If the Current Blood Glucose Level is Low than do not        give any bolus;    -   Rule #22: If Current Blood Glucose Level is Normal and the        Future Trend of Blood Glucose is Descent than decrease the basal        rate by 60%;    -   Rule #28: If the Current Blood Glucose Level is Normal than do        not change the basal rate;    -   Rule #53: If the Current Blood Glucose Level is NormalHigh and        the Predicted Blood Glucose Level is at NormalHigh than increase        the basal rate by 60%;    -   Rule #55: If Past Trend of Blood Glucose is Not Descending, the        Current Blood Glucose Level is at NormalHigh, the Future Trend        of Blood Glucose is Stable and the Predicted Blood Glucose Level        is AboveNormal than give 50% of the suggested bolus.

Generally, each rule includes a relationship (e.g. modification) betweenthe current specific patient's condition deduced from the values of theinput parameters and the appropriate treatment to be delivered to thepatient. In particular, the rules can define a relationship betweenqualitative parameters and a suggested treatment to the patient. Forexample, the rule can provide relationship between past traces orpatterns of glucose measurements to the appropriate treatment. Inanother example, rule can provide relationship between predicted tracesor patterns of glucose measurements to the appropriate treatment. Theappropriate treatment can accommodate bringing the range of measuredglucose level to a desired range. The patterns or traces (past orpredicted) can be represented by a calculated trend. In respect, glucosetraces or patterns can be represented by a series of glucosemeasurements each obtained at a certain time. Thus, glucose traces orpatterns can also be represented by at least two glucose measurementsobtain at a time interval. Predicted trends can be deduced from the pasttraces or patterns i.e. past traces or patterns can be used to determinea predicted traces or patterns. Such determination is typicallyperformed by employing a prediction model, some of which are known inthe art. Moreover, one element (a glucose level) of a predicted trace orpattern can be selected to be the predicted blood glucose level or afuture level.

Reference is now made to FIG. 19 exemplifying a flow diagram within theprocessing unit 30 of a treatment system utilizing a monitoring systemof the present invention according to one embodiment of the presentinvention.

In some embodiments, the system comprises an event detector module 902operable to determine the occurrence of an event or the probability ofthe patient to be in a special event as a function of a time. Thespecial event may be sleep, meal, exercise or disease event. The eventdetector module is designed to detect such special dynamics associatedwith each special event. Based on the event that was detected, theproper CRM and CTM are selected.

In some embodiments, at least two controllers are used: rest timecontroller (for example, the fuzzy logic engine previously discussedabove) and a controller designed to deal with the special event, such asa meal, which is referred to as meal treatment module/meal timecontroller. Therefore, the present invention provides for alternatingbetween at least two fuzzy logic engines (rest time controller and mealtime controller).

According to some embodiments of the present invention the processingunit 30 comprises an event detector 902 capable for detecting mealevents. In case a meal event was detected, a meal treatment module 906configured and operable to generate an analysis of the meal event isactivated. The meal treatment module 906 if needed provides a treatmentmodification of the patient conditions to suite the meal events. Inother cases, when no meal event was detected, the Rest Time Controller904 is operable. Each controller has its own CRM (910 and 920) and CTM(912 and 922), respectively. The CRM 920 and CTM 922 of the Rest TimeController 904 are similar to the modules described above. The CRM 910of the meal treatment module 906 runs a different table of rules. Eachrule can comprise a proposed modification of the possibleinsulin/glucagon treatment during meal.

Specifically, an event detection module 902 is utilized to detect anevent which requires specialized treatment. For example, a mealdetection module can be used in order to allow a treatment suitable toan event of meal. This module monitors the blood glucose level andanalyzes pattern(s) or traces of glucose levels. In some embodiments,the meal event detector can use the definitions of the glucosequalitative parameters as they were defined for the fuzzy logic moduleabove. On detection of an abnormality in the blood glucose level, aspecial event is invoked allowing the system and providing the requiredresources of time (or otherwise) to handle the event.

In addition, a procedure or test can be used to detect the occurrence ofa special event such as a meal event. Several tests can be employed inthis respect. A test can also be employed to deny a meal event from thepatient. In some embodiments, a meal event is determined in accordanceto a pattern or trace of glucose measurements.

The following terms are used in the followings possible tests:

The term “Relevant Trend for Special Event Long” refers to the trend ofthe blood glucose level log/pattern as determined in N samples,typically the recent or last N samples. Optionally, the trend can bedetermined in accordance to method previously elaborated herein. Thetrend(s) can conveniently be denoted as a₁ . . . a_(N) and the relativetimes are τ₁ . . . τ_(N) while τ_(i+1).

The term “Relevant Trend for Special Event Short” refers to the trend ofthe blood glucose log/pattern as determined in M samples while M<N.Typically the recent or last M samples are used in this event. Thetrend(s) are a₁ . . . a_(M) and the relative times are τ₁ . . . τ_(M)while τ₁>τ_(i+1). Optionally, the trend is can be determined inaccordance to method previously elaborated herein

The term “Duration” refers to a predefined number of sample whichrepresents the amount of samples used for analysis.

The term “Differential for Special Event Long” refers to the slope (orderivative) of the blood glucose log/pattern as determined in N samples,typically the recent or last N samples. The trend(s) are d₁ . . . d_(N)and the corresponding sample times of the trend(s) are τ₁ . . . τ_(N)while τ_(i)>τ_(i+1).

The term “Differential for Special Event Short” refers to the slope (orderivative) of the blood glucose log/pattern as determined in M sampleswhile M<N. Typically, the recent or last M samples are used in thisevent. The trends are d₁ . . . d_(M) and the corresponding sample timesare τ₁ . . . τ_(M) while τ_(i)>τ_(i+1).

In some embodiments, an event is determined in accordance to pattern ortraces of glucose level measurements. In some embodiments, occurrence ofthe event is determined in accordance to a trend of pattern or traces ofglucose measurements. The event can be a meal event or a default stableglucose level (i.e. a steady state of measured glucose level). In someembodiments, the trend is any of Relevant Trend for Special Event Longor Relevant Trend for Special Event Short.

Specifically, an event (such as a meal event) can be determined in casethe trend exceeds a defined threshold or a threshold of definedqualitative input parameters. Optionally, the event can be determined ifthe calculated trend exceeds a preceding trend of traces of glucosemeasurements. In some embodiments, an event can be determined if thecalculated trend exceeds a defined threshold for a defined duration.

In addition, an event (such as an exercise event) can be determined incase the trend decreases below a defined threshold or a threshold ofdefined qualitative input parameters. The occurrence of the event can bedetermined if the calculated trend decreases below a preceding trend oftraces of glucose measurements. In some embodiments, the event can bedetermined where the calculated trend decreases below a definedthreshold for a defined duration. For example, test A positivelyidentifies a meal event if the following condition is satisfied∀aεRelevant Trend for Special Event Short:

i. a_(i)≧a_(i+1)

ii. a₁≧w·(Low Boundry of Steep Rise)+(1−w)·(Low Bound of Rise), <w<1.

where, w is a weight factor which will be set empirically;

The qualitative parameters may be defined as low boundary of steep riseand low bound of rise set empirically by the user or automatically by anautomated procedure

Test 13 will positively detect a meal event if the following conditionsare satisfied ∀aεRelevant Trend for Special Event Long:

iii. At least for Duration of the samples a_(i)≧Stable

iv. a₁>Stable and a_(z)>Stable

where, the definition of Stable can be according to the definition ofStable member functions in the fuzzy engine or otherwise set by theuser.

Test C will positive detect a meal event if the following terms aresatisfied ∀aεRelevant Trend for Special Event Short: The differencebetween the blood glucose level at τ₁ and the blood glucose level atτ_(M) is at least X

v. The difference between the blood glucose level at τ₁ and the bloodglucose level at τ_(N) is at least Y, while Y≧X

Test D will positively identify a meal event if the following terms aresatisfied ∀a_(i)|i=1, 2, 3, a_(i)>w·(Low Boundry of SteepRise)+(1−w)·(Low Bound of Rise, where, w is a weight factor which willbe set empirically or by automated procedure.

Test E checks that slope of the last (or previous) sample is smallerthan Low Bound Rise. Test E can be used to deny a meal possibility fromthe patient.

At each testing point during the operation of the systems or methoddisclosed herein, one or more of the above tests above may be satisfied.Other test can also be devised in that respect. A meal/event detectionmodule can be configured and operable to detect an event such as a mealby performing the detection tests. By running the meal detection moduleon a large set of measured data, the probability of each single test todetect the meal/event (i.e. the test's positive predictive value) can beascertained, as well as the probability combination of tests to detectthe meal/event at the same sample time. In addition, conditionalprobability of single test and/or combination of test(s) to detect themeal/event given a previous sample can be ascertained. The mealdetection module can be tested on empirically data in order to calculateeach test's positive predictive value. The result of the calculation canthen be used as the probability for each test to positively detect ameal event. The absence of a meal event can also be detected in similarmanner.

The following table provides an example for the probabilities of eachtest (that were described above) and tests combinations that werecalculated using the 10 adult group from the training version of theUVa/Padova simulator [5]. The test or test combination frequency of use(1—most frequently used and 14—rarely used) is a parameter which scalesthe tests according to the number of times in which they were activated.For example, the probability of Test A to positively detect a meal is100% however it is rarely activated.

Test Probability to positively Test's Combination detect a meal eventfrequency of use A 100% 13 AB  88% 12 ABC  72%  4 AB CD  90%  1 ABD  0%14 AC  84%  5 ACD 100% 10 AD  0% 14 B  23%  8 BC  28%  6 BCD  72%  2 BD 54%  9 C  43%  3 CD  83% 11 D  67%  7

The output of the meal detection module can be either positive ornegative. In addition, the output of the meal detection module will bethe probability that a special event, i.e. meal or sudden rise of theblood glucose levels, occurs.

A threshold probability (P %) can be determined for the occurrence ofthe special event. Once the system recognizes that the probably for aspecial event exceeded the determined threshold, it can switch the CRMand CTM previously used i.e. either a default CRM and CTM (referred inFIG. 5 as Rest Time Controller 904) or another treatment module designedfor other special events.

The CRM 910 of the meal treatment module 906 uses a fuzzy logic enginewhich typically has the same working principles described for the resttime CRM 920. It may differ in the input parameters and it may have thesame output parameters or modified output parameters. A possiblestrategy for meal related CRM fuzzy logic engine (“special event fuzzyengine”) is based on the time elapsed from the first detected specialevent of a measured series. It can thus allow application of treatmentrules comprising greater amount of insulin in a first stage in order todeal with the special event. On the other hand, it allows the system tobe more decisive on decreasing the basal rate and even stopping theinsulin infusion in order to prevent hypoglycemia.

There are several conditions which can control the switching oralternating between the meal treatment module 906 and Rest timecontroller 904.

For example, if the last used module is the rest time controller, theconditions can be as follows:

1. Obtaining the blood glucose level reading;

2. If the probably of special event is P % or higher, switching to thespecial event fuzzy engine, otherwise continue with the rest timecontroller

For example, if the last used controller is the meal treatment module:

1. Get the blood glucose level ([BG_(i−N):BG_(i)]) reading and pastglucose trend

$( \lbrack {{\overset{\bullet}{BG}}_{i - N}:{\overset{\bullet}{BG}}_{i}} \rbrack )$

for time samples [t_(i−N):t_(i)];

2. if one of the following conditions is satisfied—switching to the resttime controller;

a. If each value

$\lbrack {{\overset{\bullet}{BG}}_{i - N}:{\overset{\bullet}{BG}}_{i}} \rbrack$

is the range of Stable AND each of the samples [BG_(i−N):BG_(i)] islower than a threshold, for example, 130 mg/dl;

b. If each of the samples [BG_(i−N):BG_(i)] is in the blood glucoserange of [Blood Glucose Target−Y %, Blood Glucose Target+Z %] AND eachof the samples

$\lbrack {{\overset{\bullet}{BG}}_{i - N}:{\overset{\bullet}{BG}}_{i}} \rbrack$

is lower than high boundary of the Stable range;

3. Otherwise, if there has been more than T minutes from the firstdetected special event of the previous/last series and at currentsample, a special event was detected as well; set the current sample asthe first detected special event of a new series and continue using themeal treatment module;

4. If none of the above conditions is satisfied, use meal treatmentmodule; The input parameters for the special event fuzzy engine are asfollows: Blood glucose level trend in the last minutes, current bloodglucose level, predicted blood glucose level trend in the next T₂minutes, predicted blood glucose level in T₂ minutes, time elapsed sincea first detected special event of a previous/last measurement series,blood glucose level trend in the last T₃ minutes before the firstdetected special event of the previous/last series and blood glucoselevel at the time of the first detected special event of the lastseries.

The output parameters for the special event fuzzy engine are as follows:change of basal infusion rate from the default basal and percent ofinsulin/glucagon bolus.

By way of non-limiting example, the input parameters and thecorresponding membership functions used herein below refer to MATLABbuilt membership functions as follows: “smf”, shaped membershipfunction; “Zmf”, Z-shaped membership function; “gauss2mf”, Gaussiancombination membership function; “trimf”, Triangular-shaped built-inmembership function; and “trapmf”, Triangular-shaped built-in membershipfunction.

Qualitative Inputs Parameters:

-   -   Past Trend of Blood Glucose (i.e. Blood glucose level trend in        the last T₁ minutes [mg/dl/min])

MF name MF function MF ranges Rapid Descent Zmf  −5, −2.5 ModerateDescent gauss2mf −2.5,− 1.5 Slow Descent gauss2mf −1.5, −0.5 Stablegauss2mf 0.5, 0.5 Slow Increase gauss2mf 0.5, 1.5 Rapid Increase Smf2.5, 5   Slow Increase or Stable gauss2mf   0, 1.5 Some Descent Zmf  −5, −0.5 Not Rapid Descent gauss2mf −2.5, 0     Not Rapid Increasegauss2mf 0.5, 2.5

-   -   Current Blood Glucose level [mg/dl]

MF name MF function MF ranges Low and Below Zmf 20, 70 Normal gauss2mf 90, 150 High gauss2mf 150, 220 Very High Smf 220, 300 Below Normal Zmf20, 90 Above Normal Smf 130, 300 High and Above Smf 180, 300

-   -   Future Trend of Blood Glucose (i.e. Predicted blood glucose        level trend in the next T₂, minutes [mg/dl/min])

MF name MF function MF ranges Rapid Decrease zmf   −5, −2.5 SlowDecrease gauss2mf −1.5, −0.5 Stable gauss2mf −0.5, 0.5   Slow Increasegauss2mf 0.5, 1.5 Moderate gauss2mf 1.5, 2.5 Increase Rapid Increase smf2.5, 5   Some Decrease zmf −0.5, −5   Not Rapid gauss2mf −0.5, −2.5Decrease Not Increasing zmf  −5, 0.5  Some Increase smf 0.5, 5   NotRapid Rise gauss2mf 0.5, 2.5 Not Slow Rise smf 1.5, 5  

-   -   Predicted blood glucose level in T₂ minutes [mg/dl]

MF name MF function MF ranges Low and Below zmf 20, 90 Normal gauss2mf 90, 140 High gauss2mf 180, 220 Very High smf 220, 300 Not Low smf 110,180 Below Normal zmf 20, 90 Not Above zmf  70, 130 Normal Above Normalsmf 130, 180 High or Very smf 180, 300 High

-   -   Time past since the first detected special event of the last        series [min])

MF name MF function MF ranges Meal Start zmf  0, 45 During Meal srnf 45, 300

-   -   Blood glucose level trend in the last T₃ minutes before the        first detected special event of the last series [mg/dl/min]

MF name MF function MF ranges Slow Increase gauss2mf 0.5, 1.5 ModerateIncrease gauss2mf 1.5, 2.5 Rapid Increase smf 2.5, 5   Not Slow Rise smf1.5, 5  Some Increase smf 0.5, 5   Not Rapid Rise gauss2mf 0.5, 2.5

-   -   Blood glucose level at the time of the first detected special        event of the last series. [mg/dl]

MF name MF function MF ranges Low and Below zmf 20, 70 Normal gauss2mf 90, 130 Very High gauss2mf 220, 300 Below Normal zmf 60, 95 AboveNormal smf 135, 220

Output Parameters:

-   -   Change in percent of basal infusion rate from the default basal        [%]

MF name MF function MF ranges 0   trapmf −100 0.2 trimf  −80 0.5 trimf −50 1   trimf    0 1.5 trimf  +50 2   trapmf +100

-   -   Percent of bolus [%]

MF name MF function MF ranges 0   trapmf  0 0.5  trimf  50 1   trimf 1001.2  trimf 120 1.35 trimf 135 1.7  trimf 170 2   trimf 200 2.5  trimf250 3   trapmf 300

The person skilled in the art would appreciate that the glucose ranges,member functions and time intervals can also be modified in accordanceto suit particular treatment envisaged.

The table of rules of the special event module (or special event CRM)may have a number of inputs from one to seven inputs and a number ofoutputs from one to two. The ranges of such inputs and outputs aredefined per se and are not different for each fuzzy logic module.

For example, the CRM for meal event includes 130 rules, Some exemplaryrules are provided as follows:

-   -   Rule #21: If Time Passed from Meal Start is not greater than 45        minutes, Current Blood Glucose Level is Normal and Predicted        Blood Glucose Level is Very High than give 200% of basal and        300% of recommended bolus;    -   Rule #84: If Time Passed from Meal Start is greater than 45        minutes, the Past Trend of Blood Glucose is not increasing        rapidly and Current Blood Glucose Level is High than give 100%        of basal rate and 100% of recommended bolus;    -   Rule #110: If Time Passed from Meal Start is greater than 45        minutes, Current Blood Glucose Level is High, the Future Trend        of Blood Glucose is not increasing rapidly and Predicted Blood        Glucose Level is High than give 100% of basal rate and 120% of        recommended bolus;    -   Rule #126: If Time Passed from Meal Start is greater than 45        minutes, the Past Trend of Blood Glucose is not Descending        Rapidly, Current Blood Glucose Level is Above Normal and        Predicted Blood Glucose Level is Above Normal than give 100% of        basal and do not give any bolus;    -   Rule #128: If Time Passed from Meal Start is greater than 45        minutes, the Past Trend of Blood Glucose is Stable, Current        Blood Glucose Level is Above Normal and Predicted Blood Glucose        Level is Above Normal than give 100% of basal and 100% of        recommended bolus.

The meal detection and treatment module uses a combination of fuzzylogic model and trend analysis of glucose profile. The system includinga meal detection and treatment module was evaluated on 24 hour in silicatrials with three meals using the UVA/Padova simulator. The improvedsystem succeeded to increase the time spent between 70-180 mg/dl by 10%(p=0.02) by decreasing the time spent above 180 mg/dl in similar percent(p=0.02) and without increasing time spent below 70 mg/dl. In bothsystems, time spent below 70 mg/dl was on average less than 1.6%. Inaddition, mean BG level was decreased from 150 mg/dl to 138 mg/dl(p=0.002).

Reference is made to FIG. 20 illustrating an example of the operation ofthe processing unit 30. The encircled area is the current decision point(15 h31) of the system at which the measured data is a glucose level of190 mg/di. The portion of the graph before the encircled area is themeasured data stored in the History Log.

The patient profile includes basal plan, correction factor, activeinsulin etc. For example the basal rate taken from the basal planassigned for the time 15 h31 is 0.9 units per hour, the correctionfactor is 50 mg/dl/unit and the predefined glucose target level is nomg/dl.

The data analysis 34 provides for example that the past trend is 0mg/dl/min, the future trend is −0.24 mg/dl/min and the predicted glucoselevel is in the coming 30 minutes is 179 mg/dl/min.

Since no special event was detected the Rest Time controller is applied.

The CRM 910 uses appropriate rules from the table of rules thereforeincreasing the basal rate by 79% and deliver 73% of the calculatedbolus. The CTM 912 outputs that for a glucose level of 190 mg/dl, theinsulin amount 1.6 units. 73% of the 1.6 units of recommended bolus are1.1 units. The suggestion may also be stored in the History Log.

Since a bolus is recommended, the CTM decides to ignore the CRMrecommendation of increasing the basal rate and sends the followingcommand to the delivery pump: basal rate=0.9 units/hour and bolus units.The insulin pump 24 receives the amount of insulin to be delivered.

According to another broad aspect of the present invention, there isprovided a method which improves and maintains the closed-loop systemperformance and therefore the treatment on a specific patient. Themethod is a learning algorithm for automatic analysis of controlperformances against intra-patient variances in the glucose/insulindynamics, with adjustments of the control parameters accordingly. Thelearning method can be performed by an independent module to extract thepatient profile from data.

The method comprises analyzing initial settings based on open loop data,as well as making periodical adjustments during close-loop operation.

The performances of the learning integrated method were evaluated usingten subject adult population from the UVa/Padova simulator. A nominalsimulation day consists with three meals (at 9 am, 2 pm and 7 pm, of 40g, 70 g and 50 g, respectively) was defined. All subjects followed thesame scenario which includes open-loop un-perfect meals carbohydrateestimation (2 days) followed by close-loop (5 days) therapy. Thelearning method was automatically activated after the open-loop sectionas well as after every 24 h of close-loop until achieving optimalperformances. The clinical measures achieved during optimal day ofclose-loop (OpCL), day1 of close-loop (DICL) and average open-loop (AOL)were compared (one way ANOVA). BG below 70 mg/dl was 0-0.4% in all daysof simulation. While there was no significant change in theadministrated insulin, time spent in 80-120 mg/dl was significantgreater in OpCL (53+8%) versus D1CL (41±8%) and AOL (18±8%) (p<0.001).Mean BO was 121+5 mg/dl in OpCL compared to 129±7 mg/di in D1CL (p=0.01)and 140±7 mg/dl in AOL (p<0.001).

The present invention discloses an automated learning method and systemsfor permitting automatic determination of the patient's initialtreatment profile. These methods can be performed by a dedicated moduleconfigured and operable to execute them. The learning method can bedivided into two main sub-procedures:

I) An initial learning, which receives measured data of the subjectduring open-loop associated treatment. Typically, the measured data iscollected while the patient is performing his own treatment at home. Thedata is typically generated by at least one of drug delivery devices andglucose measurement devices and comprises the sensor readings, mealamounts and times and/or insulin treatment(s), either bolus and basal.The initial learning procedure can analyze the data (measured orcalculated) and determine automatically the patient's initial treatmentprofile. The patient's initial treatment profile include at least one ofcorrection factor, basal plan, insulin/glucagon pharmacokineticsassociated data, glucose target level or target range level, glucagondosage, insulin bolus and insulin activity model;

II) The continuous learning procedure can update the patient's treatmentprofile during the closed-loop operation. The patient's treatmentprofile include at least one of basal plan, insulin sensitivity factorsfor carbohydrates and glucose level correction, glucagon sensitivityfactor and insulin/glucagon pharmacodynamics associated data. Thepatient's treatment profile can be adaptive in accordance withclosed-loop history log.

The initial learning sub procedure and the continuous learning procedurecan be performed separately, sequentially or in combination.

In some embodiment, the insulin sensitivity factors (for carbohydratesand glucose level correction, denoted as CF) are determined during theinitial learning procedure. In some embodiments, the insulin sensitivityfactor is determined at least in accordance with carbohydrate consumedby the patient, measured data of glucose sensor reading, and thepatient's treatment which can include insulin dosage, or basal plan.

Optionally, the data is collected while the patient was at home. In oneembodiment, optionally during the initial learning procedure, an insulinsensitivity factor CF₁ is determined as follows:

-   -   Determining CF₁ in accordance with carbohydrate amount, glucose        and insulin related data:

${CF}_{1} = \frac{G_{e} - G_{s} + {{dC} \cdot C}}{B}$

wherein G_(e) is the first sensor reading [mg/dl] of the open loopsession; G_(s) is the last sensor reading [mg/dl] of the open loopsession; dC is a glucose to carbohydrate ratio. The ratio of glucose tocarbohydrate can be 3.33, (based on empirical knowledge); C is amount ofcarbohydrate consumed [e.g. gr] during the open loop; and B is theamount of bolus insulin provided [units of insulin] during the open loopsession.

G_(e)−G_(s) is defined as the difference between G_(e) (a first glucosesensor reading) and G_(s) (a second glucose sensor reading). The timeinterval between the two glucose sensor readings can be defining a timewindow.

In some embodiments, the glucose derived from the consumed carbohydratewithin the time window is estimated. Such estimation can be performed byobtaining an amount of carbohydrate consumed in the time window andtransforming the carbohydrate amount to glucose derived thereof.

The transformation can be performed by determining a coefficientdefining the proportion of consumed carbohydrate to glucose derivedthereby e.g. (dC above). By multiplying the coefficient with the amountof carbohydrate consumed in the time window, the glucose derived fromthe consumed carbohydrate is determined.

Adjustment of difference between the first and second glucose sensorreading can be effected by summing the difference between the first andsecond glucose sensor readings and the glucose derived from the consumedcarbohydrate; thereby obtaining an adjusted glucose amount.

Determining the insulin sensitivity (e.g. CF1) can be determined inaccordance to the relation between the adjusted glucose amount andinsulin bolus provided during the time window. Relation can be thedefined by the proportions between the respective values as shown above.

In some embodiments, G_(e) may be the first reading of a portion of anopen loop session and/or G_(s) may be the last sensor reading of aportion of an open loop session. In some embodiments, G_(e) may be thefirst reading of a portion of a closed loop session and/or G_(s) may bethe last sensor reading of a portion of a closed loop session.

Optionally, the sensitivity factor such as CF₁ may be modified based onanalysis of the quality of glucose control of the patient using the datathat was collected while the patient was at home.

In some embodiments, insulin sensitivity factor (e.g. CF1) is modifiedin accordance with measured glucose levels. For example, insulinsensitivity factor is modified in accordance with minimum sensor readingor lowest blood glucose reading recorded in neither during hypoglycaemianor hypoglycaemia. In a specific example, the insulin sensitivity ismodified in accordance with proportion between minimum sensor readingduring the time window and the lowest blood glucose reading recorded inneither during hypoglycaemia nor hypoglycaemia. In some embodiments, theinsulin sensitivity is modified in accordance to the maximum sensorreading in a time interval prior to the obtaining of the minimum sensorreading (an example is shown below).

Therefore, insulin sensitivity or CF1 can further be modified inaccordance with factor (a) to produce a modified correction factor CF₂in accordance with the formula: CF₂=a·CF₁ wherein factor (a) is definedas the factor of modification of CF₁.

Factor a may be determined, according to the following procedure:

If Thypo>0 or Tihypo > 1  If (Speak>Smin) and (Speak> UpperLimit)   a =(Speak − Smin)/ (Speak −UpperLimit);  Else   a = UpperLimit/Smin;  EndElse

wherein Thypo is a percent of time spent in defined hypoglycemia rangeduring the relevant period; Tihypo is a percent of time spent in definedimpending hypoglycemia range during the relevant period; Smin is aminimum sensor reading during the relevant period; Smean is the averagesensor readings during the relevant period; Smax is a maximum sensorreading during the relevant period; Speak is a maximum sensor level intime range of up to three hours before the Smin tire, during therelevant period; UpperLimit is the lowest blood glucose reading that isrecorded neither during impending hypoglycemia nor hypoglycemia; Sn_lowis the lower boundary of “strict normal” glucose range (can beempirically defined as the glucose range in the range of about 80-120mg/dl), which is typically set to be 80; Sn_high is the higher boundaryof “strict normal” glucose range, which can be set to be 120; dN is thesubtraction Sn_high−Sn_low.

A histogram (or alternatively a distribution function) can be determinedby using the measured glucose levels of the patient. The histogram is afunction representing occurrences of each measured glucose level of thepatient during a certain time window. P can be defined as summation ofthe occurrences (or an accumulated measured glucose levels) at aninterval of a specific width (dN representing glucose measurementinterval), wherein v is the initial glucose reading in this specificwindow, individualized for each patient.

val=arg max_(v){P(v, v+dN)}, where P(v, v+dN) is the percentage ofglucose readings with the range [v, v+dN]; argmax_(v) means determiningthe v where P reaches maximum value.

a=0.57·a _(—) Tsn+0.28·a_Hyper+0.15·a_Mean, where

a_Tsn=sn_low/val;

a_Hyper=180/Smax; typically defined empirically

a_Mean=110/Smean; typically defined empirically

W=[0.57 0.28 0.15], a weighing vector/coefficients, typically definedempirically.

End

The person skilled in the art would appreciate that the weighing vectorcan be adjusted or modified to suit particular insulin/glucagonstreatments.

In some embodiments, therefore a histogram representing the occurrenceof measured glucose level of the patient during a certain time window isdetermined. The local maximum (or peak) in a glucose measurementinterval can then be obtained, for example by maximizing the functionP(v, v+dN) as exemplified above.

Therefore, in some embodiments, the insulin sensitivity factor ismodified in accordance with the local maximum (or peak) of measuredglucose level histogram within a glucose level interval. In someembodiments, the insulin sensitivity factor is modified in accordancethe accumulated measured glucose level in the histogram within a glucoselevel interval. Modification of the insulin sensitivity factor can takethe form of transforming the accumulated measured glucose levels inaccordance with a weighing vector or coefficient.

In some embodiments, the safety of CF₂ or CF₁ can be tested to verifythat whether the insulin dosing provided is safe. The test can beperformed by processing a series of glucose sensor reading previouslyobtained for a treated patient (such as the treated patient) i.e. aprevious glucose trace. Thus, sensor readings from the open loop sessioncan be used to simulate insulin bolus recommendations for theclosed-loop session.

In some embodiments, the test is defined as follows:

If Bsim>Btotal

${CF} = {\frac{Bsim}{Btotal} \cdot {CF}_{2}}$

Else

CF=CF ₂

End

wherein Bsim is total insulin boluses given by simulated closed-loopsystem (in case when simulating the open loop sensor readings), Btotalis the total amount of bolus insulin given during the open loop session.

As described above, the insulin sensitivity can include two separatefactors: insulin sensitivity for carbohydrates and insulin sensitivityfor glucose levels correction.

In some embodiments, insulin/glucagons pharmacodynamics of an individualis represented by a series or a curve describing the insulin/glucagon“active” in the blood at a certain time associated with a meal event.Therefore, the initial settings can further include determination of thepharmacodynamics parameters for insulin (denoted as active insulin) forthe individual patient, as concluded from the open loop data. Activeinsulin can be defined with reference to a specific meal or to a seriesof meals.

Ali is defined as the active insulin for a specific meal. The time ofthe meal is denoted as T0. For each meal (carbohydrates consumptionnoted in open loop data), a first time window is defined starting fromthe specific meal T0 at the open loop data until the next meal time oruntil seven hours after the meal, the earlier between the two. Peaksensor value after the meal is identified is denoted as Smmax. Minimumsensor value which occurred after the peak is denoted as Smmin. Therespective time tag when the peaks where obtained is typically recorded,defining a second time window between the time Smmax and Smmin. Sensordata during the second time window is obtained. The obtained sensor datacan be represented by a series of [Ti, Vi], where Ti are the time tagsof sensor readings with reference to the beginning the meal T0, and Viare sensor values measured at their respective Ti

In some embodiments, the measured sensor reading is normalized. Themeasured sensor reading can be normalized to value between 0 and 1. Nirepresents the normalized value of the respective Vi.

Ni can be calculated as follows:

Ni=Vi/(Smmax−Smmin).

Normalized series [Ti, Ni] can thus be obtained.

In some embodiments, the series (either [Ti, Vi] or [Ti, Ni]) aremodified (or “forced”) into a monotonic series such as a monotonicnon-increasing series. Thus, in one embodiment, a non-increasing seriesis obtained by associating each Ni to a minimum normalized Nj, j=1 to i.

In other words, Ni=min({Nj}, j=1:i).

For example, for the series N_(j)={1, 0.9, 0.8, 1.2, 0.7}, N_(i) will be{1, 0.9, 0.8, 0.8, 0.7}.

The meal peak value i.e. at T0, can be added

[T0, 1] at the beginning of the series [Ti, Ni].

The series thus obtained represents the active insulin Ali for aspecific meal.

Therefore, the present invention provides a method for determining aseries or a curve describing the insulin/glucagon in the blood at acertain time window associated with a meal event, the method comprisesobtaining plurality of sensor data measured during the time windowstarting at T0, representing the time of the occurrence of the meal;optionally normalizing the sensor data; and transforming the measuredsensor data (or normalized sensor data) to a monotonic non-increasingseries or curve; thereby obtaining a series or a curve describing theinsulin/glucagon in the blood at the time window associated with themeal event.

The method for determining a series or a curve describing theinsulin/glucagon in the blood can be performed either during open-loopsession or during a closed loop session (i.e. in real time). According,the patient's treatment profile can be modified before, at an initiallearning phase or during treatment.

In some embodiments, the plurality of sensor data measured during thetime window can be represented by a series of [Ti, Vi], where Ti are thetime tags of sensor readings with reference to the beginning the mealT0, and Vi are sensor values measured at their respective Ti.

In some embodiments, the step of transforming the measured sensor datato a monotonic non-increasing series comprises associating each Vi ofthe resultant monotonic non-increasing series to a minimum Vj, j=1 to Iin the measured sensor data.

In some embodiments, the step of transforming the normalized measuredsensor data to a monotonic non-increasing series comprises associatingeach Ni of the resultant monotonic non-increasing series to a minimumnormalized Nj, j=1 to I in the normalized sensor data.

Where more than one meal took place, the active insulin series for a setof meals can be obtained. In one embodiment, the active insulin for aset of meals is the median of all the meal series {AIi}. The resultantseries, denoted as AI_total represents an active insulin curve. Thevalues represent the percentage of insulin which is still active in thetreated patient. For example, elements of [t=25, v=0.8], within theAI_total series, can indicate that 25 minutes after injecting a bolus,80% percent of insulin was still active.

In some embodiments, basal plan is monitored and optionally modified.Insulin basal rate typically affects the dynamics of the glucose levels,but this effect is subtle compared to the observed effect ofcarbohydrates consumption (meals) and given insulin (boluses).Therefore, the open loop data is “cleaned” by taking out every segmentof glucose levels that might be affected by meals or bolus insulin.

In some embodiments, an effect window or zone of both meal and/or bolusinjection is determined (either automatically or manually such as by thephysician). For example, the effect zone, can be three hours measuredfrom the giving of the bolus or the meal. Optionally, the effect zone isset to 2, 3.5, 4, 6 or 8 hours measured from the giving of the bolus orthe meal, or even more.

Glucose sensor readings (G(t)) and the basal rates (B(t)) during theeffect zone can be referred to as “clean data”. A change of glucoselevels in time (t) can be defined by: DG(t)=dG/dt.

Basal rates at B(t) will affect DG(t+A) due to the delay time caused byinfusing. A, the time delay can be derived by determining A=argmax(A,E{B(t)DG(t+A)}), wherein A is the parameter which maximizes theexpectancy of the multiplied series B(t)*DG(1±A).

With a given A, a series of [DG(t+A), B(t)] can be defined. Therefore,in some embodiments, the relationship between bolus injections andchange of glucose level is represented by the series [DG(t+A), B(t)],thereby obtaining a series of basal treatment rates and correspondingchanges in glucose level in a treated patient. Optionally, the series[DG(t+A), B(t)] can be interpolated the series values to find B(t) whenDG(t+A)=0, thereby enabling a selection of a basal treatment rate whichminimizes a change in the glucose level (e.g. B(t)) from the series ofbasal treatment rates. The obtained basal treatment rate can be used tomodify the basal plan of the treated patient e.g. by inserting theobtained basal treatment rate as an element in the basal plan. Thus, thebasal treatment plan obtained provides for minimal changes in glucoselevel. This method can be used for controlling a personal basal plan ofthe patient.

Therefore, in one of its aspects, the present invention relates to amethod for determining insulin basal plan suitable for a patient in needthereof, the basal plan is characterized by reducing the changes to theglucose levels in the treated patient. The insulin basal plan is derivedfrom a series of basal treatment rates. The basal plan obtained can thusbe optimal. The method can be performed either during open-loop orclosed-loop sessions.

The method for determining of insulin basal plan from a series of basaltreatment rates for a patient in need thereof, comprises: obtaining aseries of basal treatment rates as a function of time; obtainingmeasured data of glucose level in the patient as a function of time;determining series of changes in glucose levels as a function of time;determining the personal time delay of the treated patient which isestimated from the series of basal treatment rates and the series ofchanges in glucose levels, thereby obtaining a series of basal treatmentrates and corresponding changes in glucose level in the patient;selecting a basal plan which incorporates the basal rates that minimizesthe change in the glucose level.

In some embodiments, measured data of glucose level in the patient isderived from glucose sensor readings, denoted as G(t) above. In someembodiments, basal treatment rates as a function of time is derived frombasal rates, denoted as B(t) above.

In some embodiments, the method is applied during a predefined effectzone. In some embodiments, a change of glucose levels in time (t) can bedefined by: DG(t)=dG/dt.

In some embodiments, the personal time delay of the treated patient isdetermined by maximizing the expectancy of the multiplied seriesB(t)*DG(t+A) such that A=argmax(A, E{B(t)DG(t+A)}), wherein A is theparameter which maximizes the expectancy of the multiplied seriesB(t)*DG(t+A).

In some embodiments, the continuous learning procedure (or Runtimelearning) modifies the insulin sensitivity factor (e.g. CF) according tothe observable/measured data. The insulin sensitivity factor can bemodified in accordance with at least one of the set{CF(i), LOG(i)},where CF(i=1) is the first CF and LOG(i=1) is the relevant LOG for thecorresponding period of CF(i=1), i.e. the time zone in which the systemutilized CF(i).

The first step of the continuous learning procedure is to determine thefactor a in accordance to the last CF and LOG in the set. These aredenoted for convenience as CF(END) and LOG(END). LOG(END) defining thecorresponding time zone/period in which the system utilized CF(END).Factor a can be determined as previously noted with respect to initiallearning procedure

The modified correction factor CFnew can be determined as follows: CFnewa*CF(END). In some embodiments, the modified correction factor isverified as reasonable or as safe. Verification of the modifiedcorrection factor can be performed by forcing constraints. For example,two constrains change the modified CF_(new) where constraints are notmet. The constrains can include two boundaries.

The two constrains are:

1. If CFnew>UP_Boundary then CFnew=UP_Boundary.

2. If CFnew<DOWN_Boundary then CFnew=DownBoundary.

where UP_Boundary and DOWN_Boundary can be defined as follows:

UP_Boundary is defined as the smallest CF in {CF(i, LOG(i)} in which theminimum sensor level reached in the relevant LOG(i) was above a certainthreshold, for example 70 mg/dl.

DOWN_Boundary can be defined according to the following:

The largest CF which caused minimum sensor value below 50 is defined tobe CF1 with minimum sensor level LEV1.

The smallest CF which caused minimum sensor value above 50 is defined tobe CF2 with minimum sensor level LEV2.

If both CFs exists and CF1<CF2, the lower boundary is defined as:

DOWN_Boundary=(70−LEV1)/(LEV2−LEV1)*(CF2−CF1)+CF1.

The following is the results of clinical trials using the monitoringsystem and method of the present invention:

The study group consisted of 7 patients, 5 female and 2 male, aged 19-30years. Mean duration of diabetes was 10±4 years; mean HbA1C, 6.6±0.7%;and mean body mass index, 22±2.5 kg/m². The patients' demographic data,diabetes history, and other significant medical history were recorded,in addition to height, weight, and HbA1c level. The patients wore a CGS(Freestyle Navigator™, Abbott Diabetes Care, Alameda, Calif., USA orSTS-Seven® System, DexCom, San Diego, Calif., USA) and recorded theirmeals and physical activities for 3-5 consecutive days. These data andcorresponding insulin doses (downloaded from the insulin pump) were usedto formulate the patient's treatment history for application in themonitoring system of the present invention.

Short-acting insulin analogue (NovoRapid®, Novo Nordisk, Bagsvaerd,Denmark) was used in the clinical trials. The CGS readings were entered(automatically or manually) into the monitoring system of the presentinvention every five minutes, and the system provided an insulin doserecommendation after each entry.

The control-to-range was set at 90-140 mg/dl, and the control-to-target,at 110 mg/dl. Each clinical session was supervised by a diabetologistwho had to approve any treatment recommendation before it wasautomatically or manually delivered by the pump to the patient.Reference blood glucose levels were measured by the YSI 2300 STAT Plus(YSI, USA) every 30 minutes. Carbohydrate was administered when thereference blood glucose level dropped below 70 mg/dl.

8-hour closed-loop sessions were conducted in the resting state undertwo conditions: fasting or meal. The subject's insulin pump was replacedby the research insulin pump (OmniPod Insulin Management System™,Insulet Corp, Bedford, Mass., USA or MiniMed Paradigm® 722 Insulin Pump,Medtronic, Northridge, Calif., USA). In the fasting closed-loopcondition, subjects arrived to the clinic in the morning (usually 08h00) after an overnight fast and were instructed to, measure their bloodglucose at wake up (usually 06 h30). If the level was below 120 mg/dlwith no hypoglycemia, they were asked to eat 1-2 slices of bread. In theclosed-loop sessions with meal challenge, patients arrived to the clinicafter about an 8 hours' fast and consumed a mixed meal with acarbohydrate content of 40-60 gr.

Two 24-hour closed-loop visits were conducted, Subjects arrived to theclinic in the afternoon after a fast of at least 3 hours. The subject'sinsulin pump was replaced with a modified OmniPod insulin pump which hascommunication abilities to a regular PC. Three standard mixed meals wereconsumed at 19 h30, 08 h00 and 13 h00, based on the patient's regulardiet. The estimated carbohydrate content for each meal was 17.5 to 70gr. Each patient slept for 7-8 hours at night during the study.

To examine the control performances of the monitoring system of thepresent invention during the 8-hour closed-loop sessions, two parameterswere analyzed: glucose excursion and degree of stabilization.

Glucose excursion is determined by the peak postprandial glucose leveland the time from initiation of closed-loop control to return of theglucose level to below 180 mg/dl.

Stable glucose levels were defined as a change of +/−10 mg/dl for aperiod of at least 30 minutes. The time from initiation of closed-loopcontrol or mealtime until the stable state was attained, and the averageglucose level at the stable state, were calculated.

In addition, 24-hour closed-loop control and the patient's homeopen-loop control were compared. The percent of glucose readings within,above, and below the range of 70-180 mg/dl was determined. The data setof the open-loop control included sensor readings from the 3-day periodprior to the 24-hour closed-loop session. Control variability gridanalysis (CVGA) [9] served as an auxiliary outcome measure. In thisanalysis, the open-loop data set included sensor readings from a periodof 9-16 days. CVGA was performed over two time periods: 24 hours andnight-time (00 h00-08 h00).

During all of the experiments, diabetes physicians approved each andevery one of the monitoring system of the present invention treatmentsuggestions.

Reference is made to Table 3 summarizing the average and ranges resultsof the 8-hours closed loop sessions clinical studies.

Average Range Fasting sessions BG at beginning of closed loop session[mg/dL] 237   178-300 Time to below 180 mg/dL from system connection 2.13  0.5-4.43 [hour] Time to stable BG levels [hours]  4.4  2.3-6.75BG level at stabilization [mg/dL] 112    77-155 Meal sessions BG atbeginning of closed loop session [mg/dL] 96    70-138 Peak Post prandialBG level [mg/dL] 234   211-251 Time to below 180 mg/dL from meal onset[hours]  2.56 2.18-3   Time to stable BG levels [hours]  3.43   3-4.3 BGlevel at stabilization [mg/dL] 102     70-134.5

A total of nine closed-loop control sessions were conducted underfasting conditions at rest with six subjects. The average blood glucoselevel was 237 mg/dl at initiation of closed-loop control and decreasedto 106 mg/dl within 4.4 hours. There were no hypoglycemic episodes.

During one of the fasting session, the monitoring system of the presentinvention succeeded to prevent a hypoglycemic episode after an overdoseof insulin was delivered by the patient before his arrival to theclinic. The monitoring system of the present invention detected theoverall trend in the patient's glucose level, took the overdose intoaccount, and then decreased the insulin basal rate to full stop. Thisaction successfully lowered the patient's glucose levels to a stableaverage of 80 mg/dl within 2 hours.

Three meal-challenge sessions were conducted with two subjects. The mealwas detected and treated by the module 23 minutes on average after mealconsumption. Peak postprandial glucose levels were 234 mg/dl on average,with a maximum of 251 mg/dl (see Table 3). Blood glucose levels, for themeal-challenge sessions, decreased to below 180 mg/dl within 2.5 hourson average and stabilized in the normal range within 3.5 hours for atleast one hour.

Two 24-hour closed-loop sessions were conducted subjects #1 (Female, age30 yr, BMI 22.9 kg/m², HbA1c 5.9% with 19 years of diabetes duration)and #2 (Male, age 23 yr, BMI 21.2 kg/m², HbA1c 7% with 8 years ofdiabetes duration). During the night, blood glucose levels rangedbetween 80 and 160 mg/dl, with a nadir of 93 mg/dl for subject #1 and 80mg/dl for subject #2.

Reference is made to FIGS. 21A-21D illustrating a 24-hour closed-loopsession with subject 41. Glucose levels peaked at 260 mg/dl afterdinner, 190 mg/dl after breakfast and 210 mg/dl after lunch. Thecorresponding values for subject #2 were 221 mg/dl, 211 mg/dl and 219mg/dl. Between meals, glucose levels returned to below 180 mg/di withina mean of 2.7±0.8 hours for both subjects. Mean peak postprandialglucose level for overall sessions (8- and 24-hour) was 224±22 mg/dl,and glucose level returned to below 180 mg/dl at a mean interval of2.6±0.6 hours. Mean time to stabilization was 4±1 hours.

FIG. 21A shows the glucose trace including CGS readings (black line)reference measurements (black diamond) and the meal times (blacktriangles). FIG. 21B shows the insulin treatment (the horizontal linesrepresent the basal rate, vertical lines with dark circles representinsulin boluses line—basal rate and stem—insulin boluses) delivered bythe monitoring system of the present invention during the 24-hourclosed-loop trial with subject #1. Results from control performancescomparison between home care (circles) and the monitoring system of thepresent invention (rectangular) using the Control Variability GridAnalysis (CVGA) [9] are shown on FIG. 21C (time period of 24 hours) andFIG. 21D during night time. FIG. 21C shows a control variability gridanalysis (CVGA) over a time period of 24 hours for subject #1. FIG. 21Dshows a control variability grid analysis overnight (00:00-08:00) forsubject #1. The nine zones of the CVGA are associated with differentqualities of glycemic regulation: A—accurate control, Lower B—benigndeviations into hypoglycemia, B—benign control deviations, UpperB—benign deviations into hyperglycemia, Lower C—over correction ofhypoglycemia, Upper C—over correction of hyperglycemia, Lower D—failureto deal with hypoglycemia, Upper D—failure to deal with hyperglycemia,and E—erroneous control. In both figures, the circles represent theminimum/maximum glucose level taken from the relevant time periodglucose readings during home care and the rectangles indicate the levelsduring the closed-loop session regulated by using the monitoring systemof the present invention.

Based on the control performances analysis, glucose control was found tobe better during the 24 hours closed-loop sessions regulated by usingthe method of the present invention than the pre-study home care.

Seventy-three percent of the sensor values measured 70-180 mg/dl duringclosed-loop control compared to 70.5% over the 3-day open-loop periodprior to the trial day. In addition, none of the sensor readings werebelow 70 mg/dl during closed-loop control compared to 15.3% foropen-loop control. However, 27% of the sensor values were above 180mg/dl during closed-loop control compared to 14.2% during open-loopcontrol. On CVGA, the monitoring system was maintained benign controlover a 24-hour perspective whereas the subjects at home careovercorrected and failed to manage hypoglycemia. During the night aswell, the monitoring system maintained benign or accurate control,whereas home care was characterized by great variability. The analysisresults for subject #1 are presented in FIGS. 21C-21D.

As illustrated in FIGS. 21C and 21D, CVGA was used to compare theperformance of the monitoring system and home open-loop control. Theresults showed that during open-loop control, there was at least onerecording of glucose below 60 mg/dl per day for both subject #1 andsubject #2 (FIG. 21C). In general, these values appeared after daytimemeals, indicating poor postprandial control of glucose excursions.Although only two 24-hour closed-loop experiments were conducted, CVGArevealed a great improvement with the monitoring system during the dayand night (FIGS. 21C and 21D). Whereas peak postprandial glucose valueswere similar in both systems, only the monitoring system prevented latepostprandial hypoglycemia.

No events of hypoglycemia occurred during either the 8-hour or 24-hourclosed-loop sessions. On two occasions (8-hour closed-loop sessions), animpending hypoglycemic event was detected, with glucose levels rangingbetween 62-65 mg/dl for about 10 minutes. Although the subjects did notexperience any symptoms of hypoglycemia, our physician decided toadminister 15 gr of fast carbohydrate for safety reasons.

Feasibility studies were conducted in seven adults with type 1 diabetes(age, 19-30 yr; mean diabetes duration, 10±4 yr; mean HbA1C, 6.6±0.7%).All underwent 14 full closed-loop control sessions of 8 hours (fastingand meal state) and 24 hours.

The mean peak postprandial (overall sessions) glucose level was 224±22mg/dl. Postprandial glucose levels returned to below 180 mg/dl within2.6±0.6 hours and remained stable in the normal range for at least onehour. During 24-hour closed-loop control, 73% of the sensor valuesranged between 70-180 and mg/dl, 27% were above 180 mg/dl, and none werebelow 70 mg/dl. There were no events of symptomatic hypoglycemia duringany of the trials.

Glucose levels were maintained in the near normal range (80-160 mg/dl)at night. The monitoring system prevented nocturnal hypoglycemia bydetecting the overall descending trend in the patient's glucose leveland then decreasing the insulin basal rate to full stop. In 2 of the 14closed-loop sessions, there was a short incident of impendingasymptomatic hypoglycemia. The subjects had experienced a symptomaticnocturnal hypoglycemia event (below 50 mg/dl) prior to the clinic day,which was treated at home. The monitoring system made reasonabletreatment suggestions, which were approved by the diabetes physician incharge, and responded to the descending trend of glucose by lowering thepatient's basal rate to full stop. The physician considered the increasein the risk of recurrent hypoglycemia and therefore stopped theexperiment.

As used in the specification and the appended claims and in accordancewith long-standing patent law practice, the singular forms “a” “an” and“the” generally mean “at least one”, “one or more”, and other pluralreferences unless the context clearly dictates otherwise.

Throughout this specification and the claims which follow, unless thecontext requires otherwise, the word “comprise”, and variations such as“comprises” and “comprising”, will be understood to imply the inclusionof a stated integer or step or group of integers or steps but not theexclusion of any other integer or step or group of integers or steps.

Further, all numerical values, e.g. when referring to conditions, suchas a time window, timestamp, glucose measurements, or insulin dosageetc. are approximations which are varied (+) or (−) by up to 20%, attimes by up to 10% from the stated values. It is to be understood, evenif not always explicitly stated that all numerical designations arepreceded by the term “about”. In addition, the calculated parameters ofthe present invention can be modified or varied to approximations ofsame which are varied (+) or (−) by up to 20%.

The invention will now be exemplified in the following description ofnon-limiting examples that were carried out in accordance with theinvention. It is to be understood that these examples are intended to bein the nature of illustration rather than of limitation. Obviously, manymodifications and variations of these examples are possible in light ofthe above teaching. It is therefore, to be understood that within thescope of the appended claims, the invention may be practiced otherwise,in a myriad of possible ways, than as specifically described here inbelow.

1-58. (canceled)
 59. A monitoring system for use with disease treatmentmanagement, the monitoring system comprising: a communication interfaceto permit input of raw log data, said raw log data being indicative ofdata obtained over a certain time and including time spaced data pointsof glucose measurements, meals consumed and insulin delivery; a controlunit configured for receiving and processing said raw log data, thecontrol unit comprising: a sectioning module configured to section theraw log data within at least one time window; the sectioned time windowbeing at least one of Basal data Section (BaS), Meals data Section (MS)and Bolus data Section (BS), each sectioned time window having astarting point and having an end point such that the BaS is selectedoutside an effect window of either a meal event or an insulin bolus, theMS is selected at a predetermined time ahead of a meal data point, andthe starting point of the BS is selected as one of the following: (a)the end point of the MS or the BaS, and (b) an insulin bolus data pointwhich is outside the MS; the end point of the BS being selected as oneof the following, (i) the starting point of the MS or BaS and (ii) apredetermined time ahead of the insulin bolus data point without anyintervening insulin bolus; an unsupervised learning controllerconfigured and operable to determine an informative data piece from aresidual log data portion of said raw log data, analyze said informativedata piece and select a sectioned time window for calculation of anindividualized patient's profile related data comprising at least one ofdrug injection setting of basal insulin treatment, correction factor(CF), carbohydrate ratio (CR) and activity curve parameters of saiddrug, wherein calculation of the basal insulin treatment is based onBaS, calculation of at least one of the drug activity curve parameters,correction factor (CF) and carbohydrate ratio (CR) is based on MS, andcalculation of the correction factor (CF) or the drug activity curveparameters is based on BS; and an output module for generating treatmentdata which is indicative of the individualized patient's profile relateddata and is configured for at least one of the following: for operatinga drug injection device, and for presentation on user interface.
 60. Thesystem of claim 59, wherein said communication interface comprises userinterface to permit user input of at least a part of the raw log dataindicative at least of the insulin delivery over said certain time. 61.The system of claim 59, wherein said communication interface isconfigured to permit input of at least a part of the input raw log datafrom an external device.
 62. The system of claim 61, wherein saidexternal device comprises at least one of the following: a measurementdevice, a storage device, and a drug injection device.
 63. The system ofclaim 61, wherein said external device comprises a measurement devicecomprising a glucometer.
 64. The system of claim 59, wherein saidunsupervised learning controller is configured and operable to determineeach of said parameters from a part of said informative data piececorresponding to a selected time window of said certain time.
 65. Thesystem of claim 59, wherein the information indicative of the glucosemeasurements, insulin delivery and meals consumed is a file obtainedfrom a remote controller independently accumulating said information.66. The system of claim 65, wherein the file is downloaded from anetwork and stored in a memory module.
 67. The system of claim 59,wherein said treatment data is configured for transmission to a remotedevice.
 68. The system of claim 67, wherein said remote device comprisesat least one of the drug injection device or measurement device.
 69. Thesystem of claim 59, wherein said treatment data comprises operationalsettings of the drug injection device.
 70. The system of claim 59,wherein said treatment data comprises treatment recommendation for userenabling the user to choose whether to apply the treatmentrecommendation or not.
 71. The system of claim 59, wherein said controlunit is operable to update and/or calibrate said individualizedpatient's profile related data during treatment or during monitoringprocedure.
 72. The system of claim 59, wherein said unsupervisedlearning controller is adapted for receiving and analyzingindividualized patient's treatment history related data comprisingpatient's insulin delivery regimen given to the patient at differenthours of the day.
 73. A method for use in monitoring operation of aninsulin injection device, the method comprising: performing unsupervisedlearning of settings of the drug injection device, said unsupervisedlearning comprising: a) obtaining raw log data input accumulated on oneor more glucose monitoring units recording glucose levels of a singletreated patient along a certain time; b) sectioning the raw log data topredetermined data sections; each of the predetermined data sectionsbeing at least one of Basal data Section (BaS), Meals data Section (MS)and Bolus data Section (BS), each section having a starting point andhaving an end point such that the BaS being selected outside an effectwindow of either a meal event or an insulin bolus, the MS being selectedat a predetermined time ahead of a meal data point, and the startingpoint of the BS being selected as one of the following: (a) the endpoint of the MS or the BaS, and (b) an insulin bolus data point which isoutside the MS; the end point of the BS being selected as one of thefollowing, (i) the starting point of the MS or BaS and (ii) apredetermined time ahead of the insulin bolus data point without anyintervening insulin bolus; c) determining informative data piece fromthe raw log data input being sectioned to data sections, the informativedata piece being determined from said data section; and d) calculatingthe settings of the insulin injection device from the informative datapiece, wherein said settings include at least one parameter of basalinsulin treatment, Carbohydrate Ratio (CR), Correction Factor (CF) orActive Insulin Function (AIF) wherein the BaS enables calculation of thebasal insulin treatment, the MS enables calculation of at least one ofinsulin activity curve parameters, correction factor (CF) andcarbohydrate ratio (CR), and the BS enables calculation of thecorrection factor (CF) or insulin activity curve parameters; and e)analyzing the settings of the insulin injection device and generatingtreatment data configured for at least one of the following: foroperating the insulin injection device, and for presentation on userinterface.
 74. The method of claim 73 further comprising aligningplurality of data portions of said raw log data input along a sharedtime axis.
 75. The method of claim 74, comprising determining arepresentative data point comprising both a value of aggregated bloodglucose levels and a time stamp; the representative data point is pairedto a selected basal insulin treatment period; the representative datapoint indicates a basal insulin treatment determination for the selectedbasal insulin treatment period.
 76. The method of claim 73, wherein theraw log data input of said Basal Section (Bas) includes a series ofbasal insulin treatments as a function of time; the method comprising:determining a time delay characterizing the treated patient at saidBasal Section (Bas), said time delay being between a basal insulintreatment and changes in the glucose level; obtaining a plurality ofselected basal insulin treatments at a delivery time, a respectivepaired glucose level being at the time delay measured from the deliverytime; determining a resultant basal insulin treatment from the pluralityof selected basal insulin treatments which minimizes a change in theglucose level.
 77. The method of claim 73, comprising determining theAIF by carrying out the following method: (i) obtaining a set of glucosemeasurements and paired time stamps for the raw log data in the timesection; (ii) normalizing each glucose measurement of the set therebyobtaining a series of normalized glucose measurements and paired timestamp. (iii) processing said normalized glucose measurements and pairedtime stamp into a substantially monotonic non-increasing series; therebyobtaining the AIF.
 78. A control unit for use in disease treatmentmanagement, the control unit comprising: a data processor utilityconfigured and operable as an unsupervised learning controllerpreprogrammed for carrying out the method of claim 73.